summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAlexandra Hájková <alexandra.khirnova@gmail.com>2015-07-24 11:22:56 +0200
committerAnton Khirnov <anton@khirnov.net>2015-07-27 07:50:32 +0200
commit9e8627a1ff9207b9e272d248da2e1bd0cc6fe2fe (patch)
treec16b387b51caa07b026732fbf1f50bcc9600a9bf /libavformat
parent65c14801527068fcaf729eeffc142ffd4682a21a (diff)
downloadffmpeg-streaming-9e8627a1ff9207b9e272d248da2e1bd0cc6fe2fe.zip
ffmpeg-streaming-9e8627a1ff9207b9e272d248da2e1bd0cc6fe2fe.tar.gz
asfdec: interpret the first flag in an asf packet as length flag
if the error correction flag is not set, a packet starts with payload Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/asfdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 752d45c..642ccb2 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -1308,12 +1308,14 @@ static int asf_read_packet_header(AVFormatContext *s)
asf->packet_offset = avio_tell(pb);
error_flags = avio_r8(pb); // read Error Correction Flags
- if (error_flags & ASF_PACKET_FLAG_ERROR_CORRECTION_PRESENT)
+ if (error_flags & ASF_PACKET_FLAG_ERROR_CORRECTION_PRESENT) {
if (!(error_flags & ASF_ERROR_CORRECTION_LENGTH_TYPE)) {
size = error_flags & ASF_PACKET_ERROR_CORRECTION_DATA_SIZE;
avio_skip(pb, size);
}
- len_flags = avio_r8(pb);
+ len_flags = avio_r8(pb);
+ } else
+ len_flags = error_flags;
asf->prop_flags = avio_r8(pb);
READ_LEN(len_flags & ASF_PPI_MASK_PACKET_LENGTH_FIELD_SIZE,
ASF_PPI_FLAG_PACKET_LENGTH_FIELD_, asf->packet_size_internal);
OpenPOWER on IntegriCloud