aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-05 22:57:35 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-02-06 00:09:03 +0100
commitf6b50924a5fd4e83aff63f99107cb9475b68c972 (patch)
treefee6eac95c518f22a8cd5a4d9d5810c713d9d9a0
parenta55c274f519fad74b949a768e5d526775c4deaa6 (diff)
downloadffmpeg-f6b50924a5fd4e83aff63f99107cb9475b68c972.tar.gz
dvenc: dont fail hard if the timecode is invalid
Instead just dont store the timecode Fixes Ticket2187 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit f0eacbc760c8b27c2064cea5395e32971853c73c)
-rw-r--r--libavformat/dvenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index 0841d0e636..0b3811e838 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);
}