Browse Source

mpegps: Use av_get_packet() instead of poorly emulating it.

tags/n0.9
Alex Converse 14 years ago
parent
commit
98ef887a75
1 changed files with 1 additions and 8 deletions
  1. +1
    -8
      libavformat/mpeg.c

+ 1
- 8
libavformat/mpeg.c View File

@@ -566,14 +566,7 @@ static int mpegps_read_packet(AVFormatContext *s,
else if (st->codec->bits_per_coded_sample == 28)
return AVERROR(EINVAL);
}
av_new_packet(pkt, len);
ret = avio_read(s->pb, pkt->data, pkt->size);
if (ret < 0) {
pkt->size = 0;
} else if (ret < pkt->size) {
pkt->size = ret;
memset(pkt->data + ret, 0, FF_INPUT_BUFFER_PADDING_SIZE);
}
ret = av_get_packet(s->pb, pkt, len);
pkt->pts = pts;
pkt->dts = dts;
pkt->pos = dummy_pos;


Loading…
Cancel
Save