Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/dfa.c3
-rw-r--r--libavcodec/wmaprodec.c3
-rw-r--r--libavformat/utils.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index 6a095b2db9..bba7626cb7 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -254,6 +254,9 @@ static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height
y += skip_lines;
segments = bytestream2_get_le16(gb);
}
+
+ if (frame_end <= frame)
+ return AVERROR_INVALIDDATA;
if (segments & 0x8000) {
frame[width - 1] = segments & 0xFF;
segments = bytestream2_get_le16(gb);
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index 07cc2235ed..a71a67e12d 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -1581,7 +1581,8 @@ static int decode_packet(AVCodecContext *avctx, void *data,
(frame_size = show_bits(gb, s->log2_frame_size)) &&
frame_size <= remaining_bits(s, gb)) {
save_bits(s, gb, frame_size, 0);
- s->packet_done = !decode_frame(s, data, got_frame_ptr);
+ if (!s->packet_loss)
+ s->packet_done = !decode_frame(s, data, got_frame_ptr);
} else if (!s->len_prefix
&& s->num_saved_bits > get_bits_count(&s->gb)) {
/** when the frames do not have a length prefix, we don't know
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 33b3e75a97..89a5105063 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2146,7 +2146,7 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int f
return avformat_seek_file(s, stream_index, min_ts, timestamp, max_ts,
flags & ~AVSEEK_FLAG_BACKWARD);
}
-
+
ret = seek_frame_internal(s, stream_index, timestamp, flags);
if (ret >= 0)