[FFmpeg-cvslog] mpegtsenc: Only test the first frame for missing h264_mp4toannexb filter.
Carl Eugen Hoyos
git at videolan.org
Tue Mar 26 15:22:28 CET 2013
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Mar 26 15:15:46 2013 +0100| [8af593dd8079fda3147003778fe883cea4c2a849] | committer: Carl Eugen Hoyos
mpegtsenc: Only test the first frame for missing h264_mp4toannexb filter.
Many video players accept broken frames in a transport stream, so there
is no reason to abort remuxing when encountering one, just print a
warning instead.
Fixes ticket #1758.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8af593dd8079fda3147003778fe883cea4c2a849
---
libavformat/mpegtsenc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 0e3f81a..0ddae65 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -1095,9 +1095,12 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
uint32_t state = -1;
if (pkt->size < 5 || AV_RB32(pkt->data) != 0x0000001) {
+ if (!st->nb_frames) {
av_log(s, AV_LOG_ERROR, "H.264 bitstream malformed, "
"no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)\n");
return AVERROR(EINVAL);
+ }
+ av_log(s, AV_LOG_WARNING, "H.264 bitstream error, startcode missing\n");
}
do {
More information about the ffmpeg-cvslog
mailing list