diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-05-26 20:17:12 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-05-26 20:17:12 +0000 |
commit | 2692067a45e4cb4ce0028e170673f2b2f5039721 (patch) | |
tree | 19b10f28c74700113729a7ae6861c734e8bfab01 /libavformat/idcin.c | |
parent | 4aa606ec179a7df514fe5839b7ab5e24b42145b8 (diff) | |
download | ffmpeg-2692067a45e4cb4ce0028e170673f2b2f5039721.tar.gz |
AVPacket.pos
Originally committed as revision 4314 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/idcin.c')
-rw-r--r-- | libavformat/idcin.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/libavformat/idcin.c b/libavformat/idcin.c index 164cf556c6..aecc1098dd 100644 --- a/libavformat/idcin.c +++ b/libavformat/idcin.c @@ -255,26 +255,22 @@ static int idcin_read_packet(AVFormatContext *s, /* skip the number of decoded bytes (always equal to width * height) */ url_fseek(pb, 4, SEEK_CUR); chunk_size -= 4; - if (av_new_packet(pkt, chunk_size)) - ret = AVERROR_IO; + ret= av_get_packet(pb, pkt, chunk_size); + if (ret != chunk_size) + return AVERROR_IO; pkt->stream_index = idcin->video_stream_index; pkt->pts = idcin->pts; - ret = get_buffer(pb, pkt->data, chunk_size); - if (ret != chunk_size) - ret = AVERROR_IO; } else { /* send out the audio chunk */ if (idcin->current_audio_chunk) chunk_size = idcin->audio_chunk_size2; else chunk_size = idcin->audio_chunk_size1; - if (av_new_packet(pkt, chunk_size)) + ret= av_get_packet(pb, pkt, chunk_size); + if (ret != chunk_size) return AVERROR_IO; pkt->stream_index = idcin->audio_stream_index; pkt->pts = idcin->pts; - ret = get_buffer(&s->pb, pkt->data, chunk_size); - if (ret != chunk_size) - ret = AVERROR_IO; idcin->current_audio_chunk ^= 1; idcin->pts += FRAME_PTS_INC; |