aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
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:17:23 +0100
commit21185028b4fb505632f358121e4aca52b47cea0e (patch)
tree84322a0d636460de01576a4b43ced988281ccef0 /libavformat
parent0c2a350762c398051797638a42ea07ce4baac80d (diff)
downloadffmpeg-21185028b4fb505632f358121e4aca52b47cea0e.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)
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/dvenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index 604f4ce833..faeb8fdf8e 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);
}