Commit graph

7 commits

Author SHA1 Message Date
Bastien Nocera
53cfef3e0f asfdemux: Ignore parsing errors from broken packets
We should instead be counting the number of errors and exiting if
they're too numerous. This makes a number of broken ASF files playable.

https://bugzilla.gnome.org/show_bug.cgi?id=678543

Conflicts:

	gst/asfdemux/asfpacket.c
	gst/asfdemux/gstasfdemux.c
2012-06-27 10:21:15 +02:00
Tim-Philipp Müller
3064bf4a86 asfdemux: fix performance issue, especially with high-bitrate streams
Two things were suboptimal from a performance point of view:

a) consider a large media object such as a video keyframe, which
   may be split up into multiple fragments. We would assemble
   the media object as follows:
     buf = join (join (join (frag1, frag2), frag3), frag4)
   which causes many unnecessary memcpy()s, and malloc/free,
   which could easily add up to a multiple of the actual object
   size. To avoid this, we allocate a buffer of the size needed
   from the start and copy fragments into that directly.

b) for every fragment to join, we would create a sub-buffer
   before joining it (which would discard the sub-buffer again),
   leading to unnecessary miniobject create/free churn.

Conflicts:

	gst/asfdemux/asfpacket.c
	gst/asfdemux/asfpacket.h
2012-04-16 09:02:46 +02:00
Mark Nauwelaerts
0bc76c0d03 asfpacket: fix 0.11 ported payload extraction
... to cater for not necessarily offset == size - cur_pos,
as size may have been adjusted due to padding.

Fixes #667567.
2012-01-13 15:59:01 +01:00
Thiago Santos
2dc2be5e7b asfdemux: Porting to 0.11 2011-06-20 00:36:59 -03:00
Edward Hervey
61c00741a2 asf: Detect more payload extensions.
These should help fix interlaced/PAR issues with more files.
2009-05-12 11:53:45 +02:00
Tim-Philipp Müller
b46ece6980 gst/asfdemux/: Implement payload extension system/extended replicated data parsing, so we can extract payload duratio...
Original commit message from CVS:
* gst/asfdemux/asfheaders.c:
* gst/asfdemux/asfheaders.h:
* gst/asfdemux/asfpacket.c:
(asf_payload_parse_replicated_data_extensions),
(gst_asf_demux_parse_payload):
* gst/asfdemux/asfpacket.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_free_stream),
(gst_asf_demux_push_complete_payloads),
(gst_asf_demux_process_ext_stream_props):
* gst/asfdemux/gstasfdemux.h:
Implement payload extension system/extended replicated data parsing,
so we can extract payload durations if they're specified.
2007-04-30 15:36:00 +00:00
Tim-Philipp Müller
6197c64106 gst/asfdemux/: New packet parsing code: should put halfway decent timestamps on buffers, and might even set the appro...
Original commit message from CVS:
* gst/asfdemux/Makefile.am:
* gst/asfdemux/asfpacket.c: (asf_packet_read_varlen_int),
(asf_packet_create_payload_buffer),
(asf_payload_find_previous_fragment),
(gst_asf_payload_queue_for_stream), (gst_asf_demux_parse_payload),
(gst_asf_demux_parse_packet):
* gst/asfdemux/asfpacket.h:
* gst/asfdemux/gstasfdemux.c:
(gst_asf_demux_reset_stream_state_after_discont),
(gst_asf_demux_push_complete_payloads), (gst_asf_demux_loop),
(gst_asf_demux_setup_pad), (gst_asf_demux_descramble_buffer),
(gst_asf_demux_process_chunk):
* gst/asfdemux/gstasfdemux.h:
New packet parsing code: should put halfway decent timestamps on
buffers, and might even set the appropriate keyframe/discont buffer
flags from time to time (and even if it doesn't, I'm at least able
to debug this code); only used in pull-mode so far. Still needs
some more work, like payload extensions parsing and proper flow
aggregation, and stream activation based on preroll. Stay tuned.
2007-04-20 20:57:56 +00:00