diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-15 20:27:51 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-15 21:28:54 +0100 |
commit | 4255d6d96cb80fd411c858d424626f60b97f52ac (patch) | |
tree | d9880d38bb2ca24788c5246301a8ef980ed61ad5 /libavformat/westwood.c | |
parent | f68b19fc28df0a15fa6134726954365d70dec74f (diff) | |
download | ffmpeg-4255d6d96cb80fd411c858d424626f60b97f52ac.tar.gz |
westwooddemuxer: use av_get_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/westwood.c')
-rw-r--r-- | libavformat/westwood.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libavformat/westwood.c b/libavformat/westwood.c index 5632650b67..c232d5c829 100644 --- a/libavformat/westwood.c +++ b/libavformat/westwood.c @@ -333,13 +333,9 @@ static int wsvqa_read_packet(AVFormatContext *s, if ((chunk_type == SND1_TAG) || (chunk_type == SND2_TAG) || (chunk_type == VQFR_TAG)) { - if (av_new_packet(pkt, chunk_size)) + ret= av_get_packet(pb, pkt, chunk_size); + if (ret<0) return AVERROR(EIO); - ret = avio_read(pb, pkt->data, chunk_size); - if (ret != chunk_size) { - av_free_packet(pkt); - return AVERROR(EIO); - } if (chunk_type == SND2_TAG) { pkt->stream_index = wsvqa->audio_stream_index; |