aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-15 20:27:51 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-03 18:25:19 +0100
commit19babec06f54a9696e85964a84c01c1602ebcecc (patch)
treecfab4a7329f60523c1d533e32f514586e7da694f
parent02798736bf7b91968a67a11fd70bffebb61f0e22 (diff)
downloadffmpeg-19babec06f54a9696e85964a84c01c1602ebcecc.tar.gz
westwooddemuxer: use av_get_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 4255d6d96cb80fd411c858d424626f60b97f52ac) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/westwood.c8
-rw-r--r--tests/ref/fate/vqa-cc1
2 files changed, 3 insertions, 6 deletions
diff --git a/libavformat/westwood.c b/libavformat/westwood.c
index c94382756a..c46c3ba10e 100644
--- a/libavformat/westwood.c
+++ b/libavformat/westwood.c
@@ -338,13 +338,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;
diff --git a/tests/ref/fate/vqa-cc b/tests/ref/fate/vqa-cc
index e15e727fa1..fdc7e72eeb 100644
--- a/tests/ref/fate/vqa-cc
+++ b/tests/ref/fate/vqa-cc
@@ -68,6 +68,7 @@
1, 218996, 2940, 0xac8bb6c8
0, 222000, 192000, 0xb58c1566
1, 224996, 2940, 0xa503c73b
+0, 228000, 192000, 0xb58c1566
1, 230996, 2940, 0x7cd588a3
1, 236996, 2940, 0xa6974b04
1, 242996, 2940, 0xbf448241