summaryrefslogtreecommitdiff
path: root/libavformat/asfenc.c
diff options
context:
space:
mode:
authorAlexandra Hájková <alexandra.khirnova@gmail.com>2015-06-15 14:54:45 +0200
committerAnton Khirnov <anton@khirnov.net>2015-06-28 10:16:40 +0200
commitb08569a23948db107e5e6175cd4c695427d5339d (patch)
tree0391df849ba3cf07ba58e78cac89f43d7203f0c3 /libavformat/asfenc.c
parent441e8ae5efd681055e5af6f4317fb60110de9dd0 (diff)
lavf: Replace the ASF demuxer
The old one is the result of the reverse engineering and guesswork. The new one has been written following the now-available specification. This work is part of Outreach Program for Women Summer 2014 activities for the Libav project. The fate references had to be changed because the old demuxer truncates the last frame in some cases, the new one handles it properly. The seek-test reference is changed because seeking works differently in the new demuxer. When seeking, the packet is not read from the stream directly, but it is rather constructed by the demuxer. That is why position is -1 now in the reference. Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/asfenc.c')
-rw-r--r--libavformat/asfenc.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 39ba3d9b92..f6608d5292 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -185,6 +185,27 @@
#define DATA_HEADER_SIZE 50
+typedef struct ASFStream {
+ int num;
+ unsigned char seq;
+ /* use for reading */
+ AVPacket pkt;
+ int frag_offset;
+ int timestamp;
+ int64_t duration;
+
+ int ds_span; /* descrambling */
+ int ds_packet_size;
+ int ds_chunk_size;
+
+ int64_t packet_pos;
+
+ uint16_t stream_language_index;
+
+ int palette_changed;
+ uint32_t palette[256];
+} ASFStream;
+
typedef struct ASFContext {
uint32_t seqno;
int is_streamed;