[FFmpeg-cvslog] lavf: add a forgotten NULL check in convert_format_parameters().
Anton Khirnov
git at videolan.org
Sun Jun 19 04:16:47 CEST 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Jun 18 17:26:40 2011 +0200| [84bd2b4bf5ca544e29c48634ac8b2899c58b0d9d] | committer: Anton Khirnov
lavf: add a forgotten NULL check in convert_format_parameters().
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=84bd2b4bf5ca544e29c48634ac8b2899c58b0d9d
---
libavformat/utils.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e3485e6..81bc9b7 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -395,6 +395,9 @@ static AVDictionary *convert_format_parameters(AVFormatParameters *ap)
char buf[1024];
AVDictionary *opts = NULL;
+ if (!ap)
+ return NULL;
+
if (ap->time_base.num) {
snprintf(buf, sizeof(buf), "%d/%d", ap->time_base.den, ap->time_base.num);
av_dict_set(&opts, "framerate", buf, 0);
More information about the ffmpeg-cvslog
mailing list