summaryrefslogtreecommitdiffstats
path: root/libavformat/mpeg.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/vobsub: fix NULL dereferenceClément Bœsch2014-09-131-1/+1
|
* avformat/mpeg: update comment on probe scoreMichael Niedermayer2014-09-091-1/+1
| | | | | 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-091-1/+1
| | | | | | Fixes Ticket 3855 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* replace calls to url_feof() with avio_feof()James Almer2014-08-081-3/+3
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* fix various typosLou Logan2014-06-031-1/+1
| | | | | 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-241-23/+35
| | | | | | 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-011-1/+1
|
* avformat/vobsub: remove pointless FAIL macro.Clément Bœsch2014-05-011-4/+2
|
* Merge commit '5b8f0a5eac75d16376af60a6f6bb79b3e9e6dab7'Michael Niedermayer2014-03-241-134/+152
|\ | | | | | | | | | | | | | | | | | | * 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-241-141/+169
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Ignore es_map_length when parsing mpeg program stream map.Carl Eugen Hoyos2013-12-051-0/+2
| | | | | | | | Fixes ticket #3195.
* | Support AC-3 in Sega Dreamcast Sofdec files.Carl Eugen Hoyos2013-12-011-1/+7
| | | | | | | | Fixes ticket #3184
* | avformat/vobsub: fix invalid sub queue access while seeking.Clément Bœsch2013-10-201-0/+2
| | | | | | | | | | | | | | | | | | 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-041-1/+4
| | | | | | | | | | This restore the latest packet which was dropped from the FATE test in dbfe61100.
* | avformat/vobsub: fix several issues.Clément Bœsch2013-10-041-17/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-081-0/+16
| |
* | Merge commit 'a42e3a6700547e4e49445bda81d3a89ec3e081a9'Michael Niedermayer2013-09-011-25/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * 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-311-27/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-051-4/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-041-4/+4
| |
* | Replace all occurrences of PRI in sscanf() calls with SCNJames Almer2013-04-101-1/+1
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | Support pcm_mulaw in Hikvision CCTV mpeg program streams.Carl Eugen Hoyos2013-03-271-11/+16
| | | | | | | | Fixes decoding the sample from videolan trac ticket #8344.
* | lavf/vobsub: free index pseudo-packet.Nicolas George2013-03-201-2/+9
| |
* | mpeg: Add passing DVD navigation packets (startcode 0x1bf) to caller to ↵Richard2013-03-171-12/+83
| | | | | | | | | | | | | | | | | | 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-241-4/+0
| | | | | | | | | | | | | | | | 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-171-1/+1
| | | | | | | | | | 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-021-3/+2
| | | | | | | | See 36e61e24.
* | mpegps_probe: make buffer related pointers constMichael Niedermayer2012-12-251-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/mpeg: suppress warning: lpcm_header_len may be used uninitialized in ↵Michael Niedermayer2012-12-241-1/+1
| | | | | | | | | | | | this function Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: VobSub demuxer.Clément Bœsch2012-12-071-0/+263
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-10-011-2/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avcodec: Convert some commented-out printf/av_log instances to av_dlog avcodec: Drop silly and/or broken printf debug output avcodec: Drop some silly commented-out av_log() invocations avformat: Convert some commented-out printf/av_log instances to av_dlog avformat: Remove non-compiling and/or silly commented-out printf/av_log statements Remove some silly disabled code. ac3dec: ensure get_buffer() gets a buffer for the correct number of channels Conflicts: libavcodec/dnxhddec.c libavcodec/ffv1.c libavcodec/h264.c libavcodec/h264_parser.c libavcodec/mjpegdec.c libavcodec/motion_est_template.c libavcodec/mpegaudiodec.c libavcodec/mpegvideo_enc.c libavcodec/put_bits.h libavcodec/ratecontrol.c libavcodec/wmaenc.c libavdevice/timefilter.c libavformat/asfdec.c libavformat/avidec.c libavformat/avienc.c libavformat/flvenc.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Remove non-compiling and/or silly commented-out printf/av_log ↵Diego Biurrun2012-10-011-2/+0
| | | | | | | | statements
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-21/+21
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-24/+24
| |
* | mpegdemux: support MLP/AOBMichael Niedermayer2012-08-041-4/+15
| | | | | | | | | | | | | | Fixes issue1731 Based-on-patch-by: carl Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mpegdemux: move private stream 1 handling out of mpegps_read_pes_headerMichael Niedermayer2012-08-041-12/+16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mpegdemux: remove redundant dvd audio codeMichael Niedermayer2012-08-041-23/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is almost a revert of: (the file from the report still works) commit 80e58c6153249a40e47a20326b7626cbe0fcabd3 Author: Benoit Fouet <benoit.fouet@free.fr> Date: Wed Feb 11 11:09:36 2009 +0000 Allow demuxing of audio substreams stored as 0x06 type. Fixes issue 725: MPEG2 PS with PCM audio. On behalf of Jai. Originally committed as revision 17150 to svn://svn.ffmpeg.org/ffmpeg/trunk Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mpegprobe: fix misdetection of mp3Michael Niedermayer2012-08-031-1/+2
| | | | | | | | | | | | Fixes tikcet1524 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-311-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpc8: return more meaningful error codes. mpc: return more meaningful error codes. wv,mpc8: don't return apetag data in packets. rtmp: do not warn about receiving metadata packets x86: h264dsp: Adjust YASM #ifdefs x86: yadif: Mark mmxext optimizations as such h264: convert loop filter strength dsp function to yasm. Improve descriptiveness of a number of codec and container long names Conflicts: libavcodec/flvdec.c libavcodec/libopenjpegdec.c libavformat/apetag.c libavformat/mp3dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Improve descriptiveness of a number of codec and container long namesDiego Biurrun2012-07-301-1/+1
| |
* | mpegdemux: Fix probing of unrecognized_mpeg_video.mpgMichael Niedermayer2012-07-311-1/+1
| | | | | | | | | | | | Fixes Ticket1586 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-161-41/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rtmp: rtmp_parse_result() add case for video and audio packets to avoid undesired debug output. configure: Move the getaddrinfo function check into the network block configure: Remove an unused 'have' item mpeg: remove disabled code libfdk-aac: Check if cutoff value is valid network: Always use our version of gai_strerror on windows network: Undefine existing gai_strerror definitions network: Extend the fallback gai_strerror implementation to handle more error codes Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg: remove disabled codeDiego Biurrun2012-07-161-41/+0
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-061-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: cosmetics: Align muxer/demuxer declarations mpeg12: Do not change frame_pred_frame_dct flag and demote error into a warning avcodec: remove avcodec_guess_channel_layout() avutil: Add av_get_default_channel_layout() Conflicts: doc/APIchanges libavcodec/mpeg12.c libavformat/cdg.c libavformat/matroskaenc.c libavformat/mpegts.c libavformat/nuv.c libavformat/wav.c libavutil/audioconvert.c libavutil/audioconvert.h libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Align muxer/demuxer declarationsMartin Storsjö2012-04-061-1/+1
| | | | | | | | | | | | | | Also add missing trailing commas, break long codec_tag lines and add spaces in codec_tag declarations. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-281-2/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (71 commits) movenc: Allow writing to a non-seekable output if using empty moov movenc: Support adding isml (smooth streaming live) metadata libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set sunrast: Document the different Sun Raster file format types. sunrast: Add a check for experimental type. libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat lavf: remove disabled FF_API_SET_PTS_INFO cruft lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft lavf: remove disabled FF_API_REORDER_PRIVATE cruft lavf: remove disabled FF_API_SEEK_PUBLIC cruft lavf: remove disabled FF_API_STREAM_COPY cruft lavf: remove disabled FF_API_PRELOAD cruft lavf: remove disabled FF_API_NEW_STREAM cruft lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft lavf: remove disabled FF_API_MUXRATE cruft lavf: remove disabled FF_API_FILESIZE cruft lavf: remove disabled FF_API_TIMESTAMP cruft lavf: remove disabled FF_API_LOOP_OUTPUT cruft lavf: remove disabled FF_API_LOOP_INPUT cruft lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft ... Conflicts: doc/APIchanges libavcodec/8bps.c libavcodec/avcodec.h libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/options.c libavcodec/sunrast.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/h264_deblock.asm libavdevice/libdc1394.c libavdevice/v4l2.c libavformat/avformat.h libavformat/avio.c libavformat/avio.h libavformat/aviobuf.c libavformat/dv.c libavformat/mov.c libavformat/utils.c libavformat/version.h libavformat/wtv.c libavutil/Makefile libavutil/file.c libswscale/x86/input.asm libswscale/x86/swscale_mmx.c libswscale/x86/swscale_template.c tests/ref/lavf/ffm Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-271-2/+1
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-291-1/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: adtsenc: Check frame size. txd: Fix order of operations. APIchanges: fill in some blanks timer: fix misspelling of "decicycles" Eliminate pointless 0/NULL initializers in AVCodec and similar declarations. indeo3: cosmetics md5proto: Fix order of operations. dca: Replace oversized unused get_bits() with skip_bits_long(). Conflicts: doc/APIchanges libavformat/mmsh.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Eliminate pointless 0/NULL initializers in AVCodec and similar declarations.Diego Biurrun2011-11-281-1/+0
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-201-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: presets: rename presets directory lavc: make avcodec_get_context_defaults3 "officially" public lavf: replace av_new_stream->avformat_new_stream part II. lavf,lavd: replace av_new_stream->avformat_new_stream part I. lavf: add avformat_new_stream as a replacement for av_new_stream. Use correct scaling table for bwd-pred MVs in second B-field Ut Video decoder Makefile: change presets extension to .avpreset lavfi: add rgbtestsrc source, ported from MPlayer libmpcodecs lavfi: add testsrc source AVOptions: add documentation. presets: update libx264 ffpresets Conflicts: Changelog doc/APIchanges doc/ffmpeg.texi ffpresets/libx264-ipod320.ffpreset ffpresets/libx264-ipod640.ffpreset ffserver.c libavcodec/avcodec.h libavcodec/options.c libavcodec/version.h libavdevice/libdc1394.c libavfilter/avfilter.h libavfilter/vsrc_testsrc.c libavformat/flvdec.c libavformat/riff.c libavformat/version.h libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud