[FFmpeg-cvslog] dvenc: dont fail hard if the timecode is invalid

Michael Niedermayer git at videolan.org
Wed Feb 6 00:21:20 CET 2013


ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Tue Feb  5 22:57:35 2013 +0100| [f6b50924a5fd4e83aff63f99107cb9475b68c972] | committer: Carl Eugen Hoyos

dvenc: dont fail hard if the timecode is invalid

Instead just dont store the timecode
Fixes Ticket2187

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit f0eacbc760c8b27c2064cea5395e32971853c73c)

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

 libavformat/dvenc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index 0841d0e..0b3811e 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -376,8 +376,8 @@ static int dv_write_header(AVFormatContext *s)
                 break;
         }
     }
-    if (tcr)
-        return av_timecode_init_from_string(&dvc->tc, rate, tcr->value, s);
+    if (tcr && av_timecode_init_from_string(&dvc->tc, rate, tcr->value, s) >= 0)
+        return 0;
     return av_timecode_init(&dvc->tc, rate, 0, 0, s);
 }
 



More information about the ffmpeg-cvslog mailing list