Commit d6cf57a0 authored by michael's avatar michael

discard dummy packets before doing inapropriate checks on them and failing as a result


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4078 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bf032bb8
...@@ -2301,12 +2301,13 @@ static int av_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, ...@@ -2301,12 +2301,13 @@ static int av_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in,
int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){
AVStream *st= s->streams[ pkt->stream_index]; AVStream *st= s->streams[ pkt->stream_index];
if(compute_pkt_fields2(st, pkt) < 0)
return -1;
//FIXME/XXX/HACK drop zero sized packets //FIXME/XXX/HACK drop zero sized packets
if(st->codec.codec_type == CODEC_TYPE_AUDIO && pkt->size==0) if(st->codec.codec_type == CODEC_TYPE_AUDIO && pkt->size==0)
return 0; return 0;
//av_log(NULL, AV_LOG_DEBUG, "av_interleaved_write_frame %d %Ld %Ld\n", pkt->size, pkt->dts, pkt->pts);
if(compute_pkt_fields2(st, pkt) < 0)
return -1;
if(pkt->dts == AV_NOPTS_VALUE) if(pkt->dts == AV_NOPTS_VALUE)
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment