Commit Graph

160 Commits

Author SHA1 Message Date
reimar 35ef167321 Make all demuxer_desc_t const, thus moving them to .rodata
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25735 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-13 16:00:39 +00:00
eugeni 55b1facb6c Instead of keeping attachments in mkv demuxer, use demuxer_add_attachment().
These attachments are passed to libass after demuxer is opened.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25686 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-12 01:12:39 +00:00
eugeni bdb6a07d2a Move all subtitle parsing from mkv demuxer to update_subtitles().
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25683 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-11 21:45:17 +00:00
eugeni d9d27bb8c4 Init and destroy ass_tracks in demuxer.c based on sh_sub->type value.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25682 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-11 21:45:15 +00:00
eugeni 2d0715a915 Set extradata for subtitle tracks in mkv demuxer.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25681 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-11 21:45:13 +00:00
eugeni 4c512b27c3 Factorize private data decoding for subtitle tracks in mkv demuxer.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25679 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-11 21:45:08 +00:00
ulion 4a901e4db0 Vobsub support tridx setting in .idx file.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25460 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-19 08:35:40 +00:00
ulion ef37a3be9c Move temp variable declaration into inner loop scope.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25332 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-10 04:37:26 +00:00
ulion 6e9b19642a Convert vobsub custom colors from rgb to yuv using a common function.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25326 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-09 06:58:57 +00:00
ulion 151e8cceec Move vobsub palette->yuv convert code into a common function.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25320 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-08 12:15:03 +00:00
ulion fad92e57fa Restore y of palette into the same value range as it was in the .ifo file.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25317 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-08 02:38:02 +00:00
aurel 5340c0c03c add support for wavpack into matroska
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24833 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-10-21 22:57:42 +00:00
diego 1c12e78686 Fix warnings:
demux_mkv.c: In function 'demux_mkv_read_chapters':
demux_mkv.c:1299: warning: unused variable 'mkv_d'
demux_mkv.c: In function 'handle_subtitles':
demux_mkv.c:2740: warning: unused variable 'mkv_d'


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24219 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-26 20:46:38 +00:00
reimar 434cf0c9eb Avoid crash if a non-existent audio track is selected with -aid
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23790 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-16 14:01:53 +00:00
aurel 338f0e6a1f fix typo in a comment
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23771 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-13 13:23:41 +00:00
reimar 01e1ab57ed Add some missing frees.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23724 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-05 22:06:05 +00:00
reimar 4c4a1070fe Avoid code duplication and ugly config.h hack by using av_strlcat/av_strlcpy
instead of plain strlcat/strlcpy


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23723 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-05 22:01:07 +00:00
reimar 4e9363a8bb index_mode is already defined in demuxer.h
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23650 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-24 13:34:16 +00:00
reimar 65d087b955 Remove the now unused demux_mkv_change_subs function
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23620 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-24 08:12:08 +00:00
reimar 27bf5698d1 Set demuxer->sub->sh to one of the s_streams like done for audio and video.
This makes the code simpler and more like the other demuxers,
allowing to remove some special cases in mplayer.c


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23618 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-24 07:29:03 +00:00
reimar 5318221f0a 100l, last demux_mkv patch passed ints instead of pointers to them to sscanf
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23611 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-23 16:57:27 +00:00
reimar dc0e2a9a46 Use sh_sub_t instead of mkv_track_t argument where possible, simplifying the code a bit.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23610 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-23 15:38:00 +00:00
uau 9a6313ed24 demux_mkv very long seek fix
The seek code searching for the closest position in the index used
"int64_t min_diff=0xFFFFFFFL" as the initial "further from the goal
than any real alternative" value. The unit is milliseconds so seeks more
than about 75 hours past the end of the file would fail to recognize the
last index position as the best match. This was triggered in practice by
chapter seek code which apparently uses a seek of 1000000000 seconds
forward to mean "seek to the end". The practical effect was that trying
to seek to the next chapter in a file without chapters made MPlayer
block until it finished reading the file from the current position to
the end.

Fixed by increasing the initial value from FFFFFFF to FFFFFFFFFFFFFFF.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23592 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-20 18:19:03 +00:00
aurel 08e5dd0793 Don't set random codec parameters for AC3/DTS in mkv.
Those values are not needed anyway.
This fixes stream copying from mkv with mencoder.
Patch by Trent Piepho.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23534 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-10 16:45:30 +00:00
eugeni aa79f008cd Fix segfault when encoding from an mkv file with embedded fonts.
Patch by Dominique Dumont (domi dumont at free fr).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23502 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-07 22:45:41 +00:00
reimar d4fbb004a6 Get rid of __attribute__((__packed__)) in Matroska demuxer
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23404 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-28 18:13:33 +00:00
reimar e576e08661 Remove useless setting of dp->len, it is already set to that value by
new_demux_packet


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23328 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-17 10:05:00 +00:00
reimar 9ef64e24e7 Fix indentation broken in r23287
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23290 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-10 14:05:06 +00:00
reimar 4ffc4db9da Support theora in mkv. Sample: http://samples.mplayerhq.hu/Matroska/theora.mkv
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23289 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-10 14:01:53 +00:00
reimar 8073174ddb Avoid code duplication in mkv demuxer for standard fourcc/extradata handling
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23288 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-10 13:58:57 +00:00
eugeni 476078aed2 Fix NULL pointer dereference in demux_mkv that happens when
demux_mkv_get_sub_lang (or demux_mkv_get_audio_lang) is called with an invalid
track number.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23205 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-01 23:04:21 +00:00
uau 8b59dd4d83 Matroska seeking fixes
If a relative seek forward went past the last index position the
Matroska demuxer did not seek to any index position. It did however set
the mkv_d->skip_to_timecode variable which meant that the next
fill_buffer() call would read from the current position until the target
position (probably the end of the file). Fix this by changing the code
to seek to the last index position if that is between the current and
target positions.

Also change backwards relative seek to accept an exactly matching index
position (<= vs <) and reorganize the seeking conditionals to allow
making the above change without turning the code into a complete mess.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22634 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-16 14:55:41 +00:00
diego a6eca2eef8 Use explicit path for headers from the loader/ directory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22624 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-15 22:34:45 +00:00
diego e085bc8dcf Add explicit location for headers from the stream/ directory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22623 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-15 18:36:36 +00:00
reimar 4b217802c4 Remove subcp_open/subcp_close from mkv demuxer, they are useless since a long time.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22463 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-05 12:02:57 +00:00
reimar 8e7945155c Use libavutil's av_clip* instead of unreadable MIN/MAX chaos.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22395 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-01 12:54:08 +00:00
reimar a63f68fb4c Make sure sub->sh is set when a subtitle is selected
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22175 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-08 14:19:18 +00:00
reimar de73d4dd97 Another round of subtitle code cleanup
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22155 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-05 18:25:28 +00:00
reimar 20d8af25be Make mkv demuxer use ffmpeg LZO as well.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22099 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-31 23:28:34 +00:00
reimar 92258be85a Simplify and make lzo decompression code more similar to zlib one.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22029 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-27 14:54:45 +00:00
reimar d7da0ebc20 Forgotten free on error
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22028 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-27 14:52:18 +00:00
reimar d8f2eaca08 *dest = malloc (*size); is useless directly before *dest = realloc (*dest, *size);
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22026 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-27 14:45:52 +00:00
diego ef3b7add5f Remove comment printed by -demuxer help, it belongs in the copyright header.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22015 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-25 17:48:38 +00:00
reimar 61e4a80191 Subtitle handling cleanup: factor out code for parsing embedded subtitles
and adding and removing of lines in subtitle struct into subreader.c.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21845 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-06 19:07:58 +00:00
uau 29a0a85b48 Fix display of multiple simultaneous subtitles without libass.
Was broken in r19649.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21720 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-21 22:11:47 +00:00
eugeni 8d4098a160 VobSub tracks cannot be handled by libass, do not mark them with 'a'.
This fixes the bug with VobSub not being displayed with -ass.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21625 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-15 19:35:06 +00:00
eugeni b5a682f0aa Rename: ass_process_font -> ass_add_font.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21471 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-03 17:35:40 +00:00
diego 9c2d44923a Remove superfluous bswap.h include.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21437 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-02 12:32:44 +00:00
eugeni d8b0acaa87 Cosmetics: indentation fix.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21182 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-23 17:37:28 +00:00
reimar b38e1ca6e7 Generalize subtitle switching, demux_ogg does not need a special case
anymore and demux_mov works now, too.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21054 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-19 14:23:54 +00:00