summaryrefslogtreecommitdiffstats
path: root/libmpdemux
Commit message (Collapse)AuthorAgeFilesLines
* Merge svn changes up to r31169Uoti Urpala2010-05-301-1/+4
|\
| * Remove internal liba52 copy.diego2010-05-091-2/+0
| | | | | | | | | | | | | | Nowadays FFmpeg is faster than liba52 and external liba52 is well supported. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31147 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use the system liba52 headers when internal liba52 is disabled, fixes:diego2010-05-091-0/+5
| | | | | | | | | | | | | | libmpdemux/muxer_mpeg.c:2121: warning: implicit declaration of function 'a52_syncinfo' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31146 b3059339-0415-0410-9bf9-f77b7e298cf2
* | cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf"Uoti Urpala2010-05-291-2/+2
| | | | | | | | | | | | | | Change 'struct vf_instance' pointer arguments to more standard style as in the subject. Also some other minor formatting fixes. Patch by Diego Biurrun.
* | demux_mkv: fix realvideo extradata handlingUoti Urpala2010-05-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The code handling larger-than-minimum realvideo extradata sizes was complete nonsense. It tried to add the additional data to the exported track extradata by reading data from the input stream, which was completely bogus as this code is called long after the original Matroska track extradata information has been read. As a result the data read had nothing to do with correct values, and the read call messed up the stream position which likely broke further parsing of the file and caused complete playback failure. Change the code to instead copy any additional part at the end of input extradata to the end of output extradata. I believe this is the intended semantics, though I haven't verified it from any specs.
* | demux_mkv: fix crash bug introduced by recent changeUoti Urpala2010-05-241-2/+2
| | | | | | | | | | | | | | Commit fc39d48465 ("demux_mkv: store streams sequentially in demuxer->[avs]_streams") had a simple bug in automatic stream selection causing a crash if no video or audio track was marked as 'default'. Fix.
* | demux_mkv: support switching to/from -nosoundUoti Urpala2010-05-221-18/+13
| | | | | | | | | | | | Allow audio stream switching to turn off sound or enable it, and also include nosound as one of the values cycled through when stepping to the next audio stream.
* | demux_mkv: store streams sequentially in demuxer->[avs]_streamsUoti Urpala2010-05-221-49/+55
| | | | | | | | | | | | | | | | | | demux_mkv used the Matroska TrackNumber as the array offset in demuxer stream lists. The TrackNumber entry stored in the file can be an arbitrary 64-bit value, and some of the code could try reading from the arrays with that offset, causing a crash if the file had insane values. Fill the arrays sequentially instead. Also add some checks to make the handling of too high stream counts more robust.
* | Make audio stream index handling saner in stream switchingUoti Urpala2010-05-222-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handling of audio stream numbering was handled in the stream selection property was a total mess. The most important issue was confusion between values used as index for demuxer->audio_streams[] array (consistently stored in demuxer->audio->id) and values stored in sh_audio->aid and used as "-aid N" option values. Now demuxer audio switch control functions and demuxer_switch_audio() are supposed to return the new value for the "-aid" option (internal MPEG demuxers still don't; the demuxer requirement could perhaps be dropped as it can be easily calculated afterwards). That is also the value returned for the "switch_audio" property. The main changes are: - Make command.c mp_property_audio() consistently use and return the "-aid" values. Before it used that as input but the array index as output, with extra mess related to demuxer_switch_audio() return value. Don't modify the audio_id option field any more. - Make demuxer_switch_audio() always return "-aid" values (like it takes as input). There are two changes for this: picking this return value in case the demuxer doesn't support switching, and overriding demuxer return value (for internal MPEG demuxers). - Make demux_lavf return "-aid" values from DEMUXER_CTRL_SWITCH_AUDIO code. This isn't actually necessary because of the override part above. Here's some history of the relevant behavior that I looked up: * For most demuxers array index and "-aid" values are the same. At least demux_mkv, (some of?) the internal MPEG demuxers and demux_ogg have differed for a long time. demux_ogg doesn't matter because it doesn't support stream switching. * Old code seemed to assume that demuxer_switch_audio() return value was array index, but this wasn't true at least for demux_mkv. * In svn r19951 reimar mostly removed use of the return value. * In r20162 ptt added mp_property_audio(). This set the global audio_id variable (-aid option value) to the return value of demuxer_switch_audio() and treated the global as the persistent value of the property, apparently assuming that it would be set to the "-aid" value, not array index. This was false for internal MPEG. * In r30124 reimar changed the property code so that even though it still modified the option value it didn't use that as the value of the property any more; instead it incorrectly used the array index. This meant that for demux_mkv the return value didn't match -aid any more (though input still did, so setting the property and querying it didn't match as they used different value systems). * In r31129 aurel made demux_lavf changes that resulted in its -aid and array index values no longer matching either. He didn't change the return value from audio switch when changing -aid, so it now matched array index only. The latter part didn't cause additional problems from r20162 though because either choice would have been broken anyway after r30124 as long as they weren't the same value.
* | options: move -alang and -slang to option structUoti Urpala2010-05-223-12/+11
| | | | | | | | | | | | | | The option field corresponding to -slang is now called "sub_lang" instead of the old misleading global name "dvdsub_lang". The code handling -slang in subreader.c looks rather broken; disable it instead of converting it to use the option field.
* | stream.h: remove bad EOF check in stream_seek()Uoti Urpala2010-05-221-1/+0
| | | | | | | | Also remove a redundant stream->eof = 0 in demuxer.c.
* | demux_mkv: read tags.Anton Khirnov2010-05-223-5/+77
| |
* | demux: use bstr arguments for demuxer_add_attachment() and demuxer_add_chapter()Anton Khirnov2010-05-224-29/+25
| |
* | demuxer.c: add demux_info_add_bstr(), use talloc for info fieldAnton Khirnov2010-05-212-15/+18
| | | | | | | | demux_info_add() is now a wrapper around demux_info_add_bstr().
* | bstr.[ch]: add new files for struct bstr related functionalityUoti Urpala2010-05-203-9/+5
| | | | | | | | | | | | | | | | Move "struct bstr" definition from ebml.h to its own header and add some utility functions/macros. Change length field type from int to size_t and adjust using code accordingly. Partially based on a patch from Anton Khirnov.
* | Merge svn changes up to r31141Uoti Urpala2010-05-071-1/+1
|\|
| * cosmetic: typo, this wasn't supposed to be pluralaurel2010-05-041-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31137 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31133Uoti Urpala2010-05-072-19/+41
|\|
| * print a more detailed and more useful description of each stream with lavfaurel2010-05-031-6/+17
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31132 b3059339-0415-0410-9bf9-f77b7e298cf2
| * 10l: correctly use video_stream instead of audio_stream in the video sectionaurel2010-05-031-2/+2
| | | | | | | | | | | | | | ( copy&paste error :( ) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31131 b3059339-0415-0410-9bf9-f77b7e298cf2
| * add ID_..._NAME to -identify for each lavf stream which has a titleaurel2010-05-031-0/+7
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31130 b3059339-0415-0410-9bf9-f77b7e298cf2
| * uniformize handling of aid and vid with lavf so that it matches handling of sidaurel2010-05-031-14/+10
| | | | | | | | | | | | | | | | | | aid and vid are now 0-based, instead of being a globally unique id. This matches the way sid is handled and the way other demuxers manage aid. As a side effect, it slightly simplifies demux_lavf. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31129 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Silence permanent warning messages when decoding H264 over rtsp withcehoyos2010-05-021-1/+6
| | | | | | | | | | | | | | | | | | live555. Patch by Gil Pedersen, gil A cmi D aau D dk git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31128 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Continue probing even for score == AVPROBE_SCORE_MAX / 4 to matchreimar2010-05-011-1/+1
| | | | | | | | | | | | | | FFmpeg's behaviour. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31111 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use av_probe_input_format2 and avoid accepting detectionreimar2010-05-011-2/+5
| | | | | | | | | | | | | | while the score is still low. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31110 b3059339-0415-0410-9bf9-f77b7e298cf2
* | demux_y4m: fix failure with nonseekable inputUoti Urpala2010-04-301-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Playback of nonseekable y4m streams was broken by a change merged from svn, r30970 which added support for multiple yuv4mpeg files concatenated together. The change included a stream_skip(stream, -1) call which only works for seekable files. Work around this by disabling the concatenated-file check for nonseekable streams. This means concatenated files are only supported if the stream is seekable, but this is an improvement compared to the svn commit which caused a regression making _all_ files fail in the nonseekable case. It would be reasonably easy to make the concatenation support work in all cases, either by modifying demux_y4m or (probably better) adding a general stream API to allow pushing back the read byte. However for now I'm only fixing the regression with the above trivial change.
* | Merge svn changes up to r31050Uoti Urpala2010-04-261-1360/+1437
|\|
| * Merge two redundant if checks, patch by ubitux, ubitux gmail com.diego2010-04-161-3/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31042 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cosmetics: reindent demux_ogg.c to K&R style plus some prettyprintingdiego2010-04-161-1360/+1438
| | | | | | | | | | | | | | patch by ubitux, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31041 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31004Uoti Urpala2010-04-263-3/+3
|\|
| * Mark muxer-related m_option_t arrays as const.diego2010-04-042-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31000 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make audio switching with AVI demuxer chose the first audio streamreimar2010-03-311-1/+1
| | | | | | | | | | | | | | if audio is disabled instead of ignoring the request. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30979 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30972Uoti Urpala2010-04-261-12/+28
|\|
| * Support concatenated YUV4MPEG files.reimar2010-03-271-11/+28
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30970 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use calloc instead of malloc+memsetreimar2010-03-271-2/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30969 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30967Uoti Urpala2010-04-262-16/+18
|\|
| * 100l, fix frametime calculation for MPEG-2 files with frame rate extension.reimar2010-03-271-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30966 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Reindentreimar2010-03-221-13/+13
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30947 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Start probing with a size matching the stream buffer size so it is possiblereimar2010-03-221-2/+4
| | | | | | | | | | | | | | to restart without seeking even without cache for easily detectable formats. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30946 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30907Uoti Urpala2010-04-262-4/+12
|\|
| * Calculate width and height in mp4_header_process_vop().cehoyos2010-03-152-0/+9
| | | | | | | | | | | | | | Fixes elementary streams with -vc ffodivxvdpau and the native demuxer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30904 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix value of bit counter at end of functions to prepare for future patches.cehoyos2010-03-151-4/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30903 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Fix chapter handling with first chapter not at beginning of fileUoti Urpala2010-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | Before "-chapter 1" did nothing even if the first chapter didn't start at the beginning of file. Fix it. Before all chapter property commands (including chapter seek keys) failed if the current playback position was before the start of the first chapter. Now they'll work. Relative chapter seeks will go to the first chapter (even if that's in the wrong direction for backward seeks).
* | demux_mkv: fix verbose output of chapter numberingUoti Urpala2010-04-251-1/+1
| | | | | | | | The "Chapter N from..." lines printed with -v used wrong N.
* | demux_lavf, stream_ffmpeg: support librtmp seeksUoti Urpala2010-04-231-4/+21
| |
* | stream_ffmpeg, demux_lavf: Use flv demuxer for rtmp streamsUoti Urpala2010-04-231-5/+7
| | | | | | | | | | | | | | | | | | | | Use lavf's flv demuxer for rtmp/rtmps/... stream types. Letting generic format probing handle this could work, but with the current probing implementation it'd at least depend on not-really-guaranteed details of the stream layer (probing different formats and then decoding depends on seeking back in between; rtmp streams don't support such seeking directly so would need to rely on details of caching behavior).
* | options: move lavfdopts to option structUoti Urpala2010-04-231-27/+28
| |
* | demuxer.c: clean up stream-seek codeUoti Urpala2010-04-231-22/+29
| | | | | | | | | | | | | | | | | | Only try to use the dvd/dvdnav stream seek hack with those stream types. Generally demuxers can not be expected to cope with the stream suddenly seeking under them. In principle it would be more correct to make the test demuxer-based (instead of assuming that using stream seeks in this manner is OK with whatever demuxer that will be used with these streams), but that'd be more work.
* | Move some sh_audio field setting out of demuxer.cUoti Urpala2010-04-231-2/+0
| | | | | | | | These fields are decoder details, not information set by the demuxer.
* | Move seek-reset functionality out of demuxer.cUoti Urpala2010-04-231-37/+0
| | | | | | | | | | | | | | Move code for resetting decoders after seeks, chapter seeks and angle changes out of demuxer.c. This functionality belongs on a higher level; the demux layer can't always know what kind of reinitialization is required.
* | demux_mkv: Fix problem with compressed subtitle private dataUoti Urpala2010-03-211-10/+12
| | | | | | | | | | | | | | Convert demux_mkv_decode() to allocate possible new storage with talloc and fix a talloc/malloc conflict in demux_mkv_open_sub() that broke decoding of files which had a subtitle track with compressed private data.
* | Delete things related to old translation systemUoti Urpala2010-03-1042-42/+0
| | | | | | | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* | Merge svn changes up to r30879Uoti Urpala2010-03-101-2/+3
|\|
| * Return MP_NOPTS_VALUE if we can't figure out the pts, not 0.reimar2010-03-091-1/+1