Originally committed as revision 14185 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Michael Niedermayer 17 years ago
parent 0bef08e516
commit 55823964dc
  1. 32
      libavformat/utils.c

@ -553,28 +553,28 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt)
} }
} }
av_init_packet(pkt); av_init_packet(pkt);
ret= s->iformat->read_packet(s, pkt); ret= s->iformat->read_packet(s, pkt);
if (ret < 0) if (ret < 0)
return ret; return ret;
st= s->streams[pkt->stream_index]; st= s->streams[pkt->stream_index];
if(!pktl && st->codec->codec_id!=CODEC_ID_PROBE) if(!pktl && st->codec->codec_id!=CODEC_ID_PROBE)
return ret; return ret;
add_to_pktbuf(&s->raw_packet_buffer, pkt); add_to_pktbuf(&s->raw_packet_buffer, pkt);
switch(st->codec->codec_type){ switch(st->codec->codec_type){
case CODEC_TYPE_VIDEO: case CODEC_TYPE_VIDEO:
if(s->video_codec_id) st->codec->codec_id= s->video_codec_id; if(s->video_codec_id) st->codec->codec_id= s->video_codec_id;
break; break;
case CODEC_TYPE_AUDIO: case CODEC_TYPE_AUDIO:
if(s->audio_codec_id) st->codec->codec_id= s->audio_codec_id; if(s->audio_codec_id) st->codec->codec_id= s->audio_codec_id;
break; break;
case CODEC_TYPE_SUBTITLE: case CODEC_TYPE_SUBTITLE:
if(s->subtitle_codec_id)st->codec->codec_id= s->subtitle_codec_id; if(s->subtitle_codec_id)st->codec->codec_id= s->subtitle_codec_id;
break; break;
} }
if(st->codec->codec_id == CODEC_ID_PROBE){ if(st->codec->codec_id == CODEC_ID_PROBE){
AVProbeData *pd = &st->probe_data; AVProbeData *pd = &st->probe_data;

Loading…
Cancel
Save