aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/dvenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-05 22:57:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-05 22:57:35 +0100
commitf0eacbc760c8b27c2064cea5395e32971853c73c (patch)
tree930cc93002da3866d025d0cd1f7538837bd98748 /libavformat/dvenc.c
parentb0635e2fcf80717dd618ef75d3317d62ed85c300 (diff)
downloadffmpeg-f0eacbc760c8b27c2064cea5395e32971853c73c.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>
Diffstat (limited to 'libavformat/dvenc.c')
-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);
}