summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/h264.c2
-rw-r--r--libavcodec/xan.c4
-rw-r--r--libavformat/mpeg.c9
-rw-r--r--tests/fate.mak2
-rw-r--r--tests/ref/fate/motionpixels1
5 files changed, 6 insertions, 12 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 40da076530..df24bcf53a 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3747,7 +3747,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
case NAL_IDR_SLICE:
case NAL_SLICE:
init_get_bits(&hx->s.gb, ptr, bit_length);
- if(!get_ue_golomb(&hx->s.gb))
+ if (!get_ue_golomb(&hx->s.gb))
nals_needed = nal_index;
}
continue;
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 21b5302000..edd4fe8197 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -555,8 +555,10 @@ static int xan_decode_frame(AVCodecContext *avctx,
}
buf_size = buf_end - buf;
}
- if (s->palettes_count <= 0)
+ if (s->palettes_count <= 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "No palette found\n");
return AVERROR_INVALIDDATA;
+ }
if ((ret = avctx->get_buffer(avctx, &s->current_frame))) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index b21bc601eb..8a79eca14d 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -572,14 +572,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;
diff --git a/tests/fate.mak b/tests/fate.mak
index 74e710db8a..d2e551ec6f 100644
--- a/tests/fate.mak
+++ b/tests/fate.mak
@@ -179,7 +179,7 @@ fate-maxis-xa: CMD = md5 -i $(SAMPLES)/maxis-xa/SC2KBUG.XA -f s16le
FATE_TESTS += fate-mimic
fate-mimic: CMD = framecrc -idct simple -i $(SAMPLES)/mimic/mimic2-womanloveffmpeg.cam -vsync 0
FATE_TESTS += fate-motionpixels
-fate-motionpixels: CMD = framecrc -i $(SAMPLES)/motion-pixels/INTRO-partial.MVI -an -pix_fmt rgb24
+fate-motionpixels: CMD = framecrc -i $(SAMPLES)/motion-pixels/INTRO-partial.MVI -an -pix_fmt rgb24 -vframes 111
FATE_TESTS += fate-mpc7-demux
fate-mpc7-demux: CMD = crc -i $(SAMPLES)/musepack/inside-mp7.mpc -acodec copy
FATE_TESTS += fate-mpc8-demux
diff --git a/tests/ref/fate/motionpixels b/tests/ref/fate/motionpixels
index 30651e92c6..fa86f7379f 100644
--- a/tests/ref/fate/motionpixels
+++ b/tests/ref/fate/motionpixels
@@ -109,4 +109,3 @@
0, 648003, 230400, 0xb343f372
0, 654003, 230400, 0xf7f1e588
0, 660003, 230400, 0x9682bdb2
-0, 666003, 230400, 0x16f9aad8