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

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


ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Tue Feb  5 22:57:35 2013 +0100| [21185028b4fb505632f358121e4aca52b47cea0e] | 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=21185028b4fb505632f358121e4aca52b47cea0e
---

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

diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index 604f4ce..faeb8fd 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