[FFmpeg-cvslog] avconv: do not abort immediately if initializing hwaccel fails

Anton Khirnov git at videolan.org
Tue Mar 10 10:57:58 CET 2015


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Mar  9 10:54:00 2015 +0100| [dc7536ca3d2dbe47f40cc0fcd0fc2555a84d5f56] | committer: Anton Khirnov

avconv: do not abort immediately if initializing hwaccel fails

exit_program() will try to free the decoders, which is not a good idea
from within get_format().
Return an error instead.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc7536ca3d2dbe47f40cc0fcd0fc2555a84d5f56
---

 avconv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/avconv.c b/avconv.c
index 8e76863..30c1ea8 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1507,7 +1507,7 @@ static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat
                        "%s hwaccel requested for input stream #%d:%d, "
                        "but cannot be initialized.\n", hwaccel->name,
                        ist->file_index, ist->st->index);
-                exit_program(1);
+                return AV_PIX_FMT_NONE;
             }
             continue;
         }



More information about the ffmpeg-cvslog mailing list