summaryrefslogtreecommitdiff
path: root/libavformat/mpeg.c
Commit message (Collapse)AuthorAge
* lavf/mpeg: use FFERROR_REDO instead of AVERROR(EAGAIN).Nicolas George2015-12-03
|
* Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes2015-10-27
|
* avformat/vobsub: do not attempt to check duplicate subtitleswm42015-09-21
| | | | | | | | | | | | | | | | Some .idx files actually contain duplicate subtitle events: timestamp: 00:07:52:600, filepos: 00004e800 timestamp: 00:07:52:600, filepos: 00004f800 The second will be dropped, because it has same pts, duration, and text (the text is just a dummy empty string; the real data is retrieved when actually reading vobsub subtitle packets). Dropping this is probably not intended/safe, so avoid it. See trac issue #4872 for a sample. This patch doesn't fix decoding of the sample, though.
* avformat/vobsub: compare correct packet stream IDswm42015-09-21
| | | | | | | | | | | | The stream ID is essentially an arbitrary number defined by the .idx file headers. They have to match the IDs in the .sub stream. The vobsub demuxer assumed the IDs would just start from 0, increassing by 1 for each stream. This is not correct. In the sample I had, the IDs were starting from 1, leading to no subtitles being displayed at all. Fix this by using the correct stream ID. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/subtitles: forward log context in ff_subtitles_queue_finalize() for ↵Clément Bœsch2015-09-10
| | | | logging
* lavf/mpeg: Allow users to force audio codec MLP.Carl Eugen Hoyos2015-08-20
| | | | Fixes part of ticket #4786.
* lavf/mpeg: Do not detect unknown audio in Hikvision streams as alaw.Carl Eugen Hoyos2015-05-17
|
* avformat/mpeg: put timestamp trace av_logs under FF_DEBUG_TSMichael Niedermayer2015-04-20
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'Michael Niedermayer2015-04-20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1a3eb042c704dea190c644def5b32c9cee8832b8': Replace av_dlog with normal av_log at trace level Conflicts: ffplay.c libavdevice/fbdev_dec.c libavfilter/avfilter.c libavfilter/internal.h libavfilter/setpts.c libavfilter/src_movie.c libavfilter/vf_crop.c libavfilter/vf_drawtext.c libavfilter/vf_fieldorder.c libavformat/assdec.c libavformat/avidec.c libavformat/flvdec.c libavformat/http.c libavformat/ipmovie.c libavformat/isom.c libavformat/mov.c libavformat/mpegenc.c libavformat/mpegts.c libavformat/mpegtsenc.c libavformat/mux.c libavformat/mxfdec.c libavformat/nsvdec.c libavformat/oggdec.c libavformat/r3d.c libavformat/rtspdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | | | | | This applies to every library where performance is not critical.
* | lavf/mpeg: vobsub add an option to specify the .sub's URIRodger Combs2015-04-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/mpeg: Support alaw in Hikvision CCTV recordings.Carl Eugen Hoyos2015-04-03
| | | | | | | | Fixes a sample from ticket #4182.
* | lavf/mpeg: Support more audio codecs in Hikvision CCTV recordings.Carl Eugen Hoyos2015-04-03
| | | | | | | | Fixes a sample from ticket #4182.
* | avformat/mpeg: remove unneeded #include, there are no assert() only av_assert*Paul B Mahol2015-01-31
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat/mpeg: Avoid dead assignmentMichael Niedermayer2015-01-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpeg: add commented out av_log() to probeMichael Niedermayer2014-12-06
| | | | | | | | | | | | This is commonly needed for debugging mis-detections Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpeg: do not count PES packets inside PES packets during probingMichael Niedermayer2014-12-06
| | | | | | | | | | | | Fixes: misdetection of test2.mp3 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpeg: fix memleak of sub_name on errorMichael Niedermayer2014-11-16
| | | | | | | | | | | | Fixes CID1254666 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpeg: Use av_find_input_format() instead of directly linking to the ↵Michael Niedermayer2014-10-25
| | | | | | | | | | | | demuxer Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: Add and use ff_copy_whitelists()Michael Niedermayer2014-10-24
| | | | | | | | | | | | | | Fixes potential security issue in case of running out of memory Found-by: ubitux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpeg: Forward whitelists to the mpegps demuxerMichael Niedermayer2014-10-23
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/vobsub: fix NULL dereferenceClément Bœsch2014-09-13
| |
* | avformat/mpeg: update comment on probe scoreMichael Niedermayer2014-09-09
| | | | | | | | | | Found-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpeg: increase score for short mpeg-ps by 1Michael Niedermayer2014-09-09
| | | | | | | | | | | | Fixes Ticket 3855 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | replace calls to url_feof() with avio_feof()James Almer2014-08-08
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | fix various typosLou Logan2014-06-03
| | | | | | | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/vobsub: do not create empty streams.Clément Bœsch2014-05-24
| | | | | | | | | | | | Fixes NULL dereference in vobsub_read_packet() on vobsub->q[i]->subs. Fixes ticket #3669.
* | avformat/vobsub: use av_make_q().Clément Bœsch2014-05-01
| |
* | avformat/vobsub: remove pointless FAIL macro.Clément Bœsch2014-05-01
| |
* | Merge commit '5b8f0a5eac75d16376af60a6f6bb79b3e9e6dab7'Michael Niedermayer2014-03-24
|\| | | | | | | | | | | | | | | | | | | * commit '5b8f0a5eac75d16376af60a6f6bb79b3e9e6dab7': mpeg: K&R formatting cosmetics Conflicts: libavformat/mpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg: K&R formatting cosmeticsTanja Batchelor2014-03-24
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Ignore es_map_length when parsing mpeg program stream map.Carl Eugen Hoyos2013-12-05
| | | | | | | | Fixes ticket #3195.
* | Support AC-3 in Sega Dreamcast Sofdec files.Carl Eugen Hoyos2013-12-01
| | | | | | | | Fixes ticket #3184
* | avformat/vobsub: fix invalid sub queue access while seeking.Clément Bœsch2013-10-20
| | | | | | | | | | | | | | | | | | If there is only 1 stream and seek isn't called with a specific stream index, we pick the first (and only) one. Regression since dbfe6110. Fixes CID1108591.
* | avformat/vobsub: raise packet even if apparently incomplete.Clément Bœsch2013-10-04
| | | | | | | | | | This restore the latest packet which was dropped from the FATE test in dbfe61100.
* | avformat/vobsub: fix several issues.Clément Bœsch2013-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is an extract of fate-samples/sub/vobsub.idx, with an additional text at the end of each line to better identify each bitmap: timestamp: 00:04:55:445, filepos: 00001b000 Ace! timestamp: 00:05:00:049, filepos: 00001b800 Wake up, honey! timestamp: 00:05:02:018, filepos: 00001c800 I gotta go to work. timestamp: 00:05:02:035, filepos: 00001d000 <???> timestamp: 00:05:04:203, filepos: 00001d800 Look after Clayton, okay? timestamp: 00:05:05:947, filepos: 00001e800 I'll be back tonight. timestamp: 00:05:07:957, filepos: 00001f800 Bye! Love you. timestamp: 00:05:21:295, filepos: 000020800 Hey, Ace! What's up? timestamp: 00:05:23:356, filepos: 000021800 Hey, how's it going? timestamp: 00:05:24:640, filepos: 000022800 Remember what today is? The 3rd! timestamp: 00:05:27:193, filepos: 000023800 Look over there! timestamp: 00:05:28:369, filepos: 000024800 Where are they going? timestamp: 00:05:28:361, filepos: 000025000 <???> timestamp: 00:05:29:946, filepos: 000025800 Let's go see. timestamp: 00:05:31:230, filepos: 000026000 I can't, man. I got Clayton. Note the two "<???>": they are basically split subtitles (with the previous one), which the dvdsub decoder is now supposed to reconstruct with a previous commit. But also note that while the first chunk has increasing timestamps, timestamp: 00:05:02:018, filepos: 00001c800 timestamp: 00:05:02:035, filepos: 00001d000 ...it's not the case of the second one (and this is not an exception in the original file): timestamp: 00:05:28:369, filepos: 000024800 timestamp: 00:05:28:361, filepos: 000025000 For the dvdsub decoder, they need to be "filepos'ed" ordered, but the FFDemuxSubtitlesQueue is timestamps ordered, which is the reason of the introduction of a sub sort method in the context, to allow giving priority to the position, and then the timestamps. With that change, the dvdsub decoder get fed with ordered packets. Now the packet size estimation was also broken: the filepos differences in the vobsub index defines the full data read between two subtitles chunks, and it is necessary to take into account what is read by the mpegps_read_pes_header() function since the length returned by that function doesn't count the size of the data it reads. This is fixed with the introduction of total_read, and {old,new}_pos. By doing this change, we can drop the unreliable len16 heuristic and simplify the whole loop. Note that mpegps_read_pes_header() often read more than one PES packet (typically in one call it can read 0x1ba and 0x1be chunk along with the relevant 0x1bd packet), which triggers the "total_read + pkt_size > psize" check. This is an expected behaviour, which could be avoided by having a more chunked version of mpegps_read_pes_header(). The latest change is the extraction of each stream into its own subtitles queue. If we don't do this, the maximum size for a subtitle chunk is broken, and the previous changes can not work. Having each stream in a different queue requires some little adjustments in the seek code of the demuxer. This commit is only meaningful as a whole change and can not be easily split. The FATE test changes because it uses the vobsub demuxer.
* | avformat/vobsub: fix seeking.Clément Bœsch2013-09-08
| |
* | Merge commit 'a42e3a6700547e4e49445bda81d3a89ec3e081a9'Michael Niedermayer2013-09-01
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'a42e3a6700547e4e49445bda81d3a89ec3e081a9': pcm_dvd: consolidate pieces from pcm.c and mpeg.c Conflicts: libavcodec/pcm.c libavcodec/version.h libavformat/mpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * pcm_dvd: consolidate pieces from pcm.c and mpeg.cChristian Schmidt2013-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the header decoding for PCM audio from mpeg.c and the 20/24bit parts from pcm.c and merge them into a new decoder in pcm-dvd.c. The decoder has added support for samples that span multiple packets and modified 20/24bit group decoding. Both is needed to decode samples that have been generated with DVD-Lab Pro 2. The decoding of 16bit PCM and two channel 24bit is identical to before. No other samples are known to verify the correctness of the encoding this software does. The complete list of tested formats is 48kHz/16bit/2-8 channels 48kHz/24bit/2-5 channels 96kHz/16bit/2-4 channels 96kHz/24bit/2 channels Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit 'e0f8be6413b6a8d334d6052e610af32935c310af'Michael Niedermayer2013-05-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e0f8be6413b6a8d334d6052e610af32935c310af': avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate Conflicts: libavformat/ac3dec.c libavformat/avformat.h libavformat/avs.c libavformat/m4vdec.c libavformat/mov.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegvideodec.c libavformat/psxstr.c libavformat/pva.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriateDiego Biurrun2013-05-04
| |
* | Replace all occurrences of PRI in sscanf() calls with SCNJames Almer2013-04-10
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | Support pcm_mulaw in Hikvision CCTV mpeg program streams.Carl Eugen Hoyos2013-03-27
| | | | | | | | Fixes decoding the sample from videolan trac ticket #8344.
* | lavf/vobsub: free index pseudo-packet.Nicolas George2013-03-20
| |
* | mpeg: Add passing DVD navigation packets (startcode 0x1bf) to caller to ↵Richard2013-03-17
| | | | | | | | | | | | | | | | | | allow better playback handling of DVDs. The two types of packets (PCI and DSI) are passed untouched but combined by the new codec ID AV_CODEC_ID_DVD_NAV. The first 980 bytes in the packet contain the PCI data. The next 1018 are the DSI data. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mpeg12demux: Fallback to startcode for stream type identification.Michael Niedermayer2013-01-24
| | | | | | | | | | | | | | | | Fixes Ticket2147 Fixes SageTV support Based-on patch by Andrew Gallatin Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Only skip MLP header in mpeg files if the codec actually is MLP.Carl Eugen Hoyos2013-01-17
| | | | | | | | | | Fixes PCM audio in Kansas Pheasant Hunt 2000 mpg file. Reported-by: Mashiat Sarker Shakkhar
* | lavf/vobsub: do not count trailing NUL char in extradata.Clément Bœsch2013-01-02
| | | | | | | | See 36e61e24.
* | mpegps_probe: make buffer related pointers constMichael Niedermayer2012-12-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/mpeg: suppress warning: lpcm_header_len may be used uninitialized in ↵Michael Niedermayer2012-12-24
| | | | | | | | | | | | this function Signed-off-by: Michael Niedermayer <michaelni@gmx.at>