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

Michael Niedermayer git at videolan.org
Tue Feb 5 23:04:44 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Feb  5 22:57:35 2013 +0100| [f0eacbc760c8b27c2064cea5395e32971853c73c] | committer: Michael Niedermayer

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>

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

 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