summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* matroska: implement support for ALACMoritz Bunkus2012-09-19
| | | | | | | | | | | | | | | | | | Support Matroska native formatting. On demuxing reconstruct the 36-bytes QuickTime atom that the ALAC decoder expects by prepending the "atom size", "tag" and "tag version" fields missing from the Matroska's CodecPrivate element. On muxing remove the initial 12 bytes Sample files are available: http://www.bunkus.org/videotools/mkvtoolnix/samples/alac/alac-in-matroska.mka and the CoreAudio file it was created from with today's mkvmerge: http://www.bunkus.org/videotools/mkvtoolnix/samples/alac/alac-in-matroska-source.caf Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* matroskadec: validate lace_size when parsedLuca Barbato2012-09-19
| | | | | Stricter validation, explicitly exit on misparsing and some error forwarding from the ebml parsing functions used.
* matroskadec: return meaningful errors in matroska_decode_bufferLuca Barbato2012-09-19
|
* matroskadec: fix incorrect unsigned->signed conversionDale Curtis2012-09-19
|
* matroskadec: refactor matroska_decode_bufferLuca Barbato2012-09-19
| | | | | Make MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP behave like the other encodings and spare few lines of boilerplate code.
* matroskadec: check realloc in lzo encodingLuca Barbato2012-09-19
| | | | Make all the compression encodings behave the same way.
* matroska: honor error_recognition on unknown doctypesLuca Barbato2012-09-19
|
* smoothstreaming: Export the mp4 codec tagsMartin Storsjö2012-09-18
| | | | | | | | | This fixes stream copy from a format that already has incompatible codec tags set. The chained ismv muxer exports this same codec tag list, so set it on this one as well, to allow the caller (and lavf common code) to set them correctly. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: check for EOF in long lasting loopsLuca Barbato2012-09-18
| | | | | | | A quite widespread pattern in the demuxer is read a 32bit unsigned integer and then loop till this value is reached. Checking for EOF prevents pathological situations.
* flvenc: silence bogus warningBenjamin Larsson2012-09-18
| | | | | | | | | The compiler fails to figure out that enc->codec_type can only have 3 different values. Thus when an if/else is encountered it triggers on the possibility of the else case has not initialized the flags variable. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* id3v2: strdup the genre name explicitly.Clément Bœsch2012-09-17
| | | | | | | | | It would have been done anyway in the av_dict_set() call. This simplifies the code and avoid a warning because of assigning a const string from ff_id3v1_genre_str to a non-const variable. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf/id3v2: do not export empty fields.Clément Bœsch2012-09-17
| | | | | | This also avoids a memleak. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mov: stsd entries must be at least 16 byteMichael Niedermayer2012-09-16
| | | | | | | | | | Fix near infinite loop in stsd parsing. Bug found by: Diana Elena Muscalu The size is unsigned according the specification. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mov: detect EOF in mov_read_dref()Michael Niedermayer2012-09-16
| | | | | | | | Avoid a near infinite loop. Issue discovered by cosminamironesei. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* file: return proper error on seek failuresLuca Barbato2012-09-16
|
* avformat: fix typo in avformat_close_inputLuca Barbato2012-09-15
| | | | The condition should not be &&.
* mp3enc: write Xing TOCAnton Khirnov2012-09-15
| | | | | | | | | | | | Based on the code by: Peter Belkner <pbelkner@snafu.de>, Michael Niedermayer <michaelni@gmx.at>, Clément Bœsch <clement.boesch@smartjog.com>, Reimar Döffinger <Reimar.Doeffinger@gmx.de>, and Tobias Rapp <t.rapp@noa-audio.com> Alex Converse <alex.converse@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mp3enc: support MPEG-2 and MPEG-2.5 in Xing header.Clément Bœsch2012-09-15
|
* mp3enc: downgrade some errors in writing Xing frame to warningsReimar Döffinger2012-09-15
| | | | Also clarify the meaning of the log message.
* lavf: flush the output AVIOContext in av_write_trailer().Anton Khirnov2012-09-15
| | | | | | | This is consistent with stdio and is what we want to do in all cases. Fixes a bug in the voc muxer which didn't flush in write_trailer() previously. This is the cause of the change in the test results.
* lavf: cosmetics, reformat av_write_trailer().Anton Khirnov2012-09-15
|
* avio: flush the internal buffer in avio_close()Stefano Sabatini2012-09-15
| | | | | This is consistent with stdio, and thus what people would naturally expect.
* riff: Add SVQ3 fourccDerek Buitenhuis2012-09-14
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avformat: refactor avformat_close_inputLuca Barbato2012-09-14
| | | | Do not crash if the input format is not allocated yet.
* avformat: simplify avformat_close_inputLuca Barbato2012-09-14
| | | | avio_close checks by itself for NULL condition.
* os_support: Choose between direct.h and io.h using a configure checkMartin Storsjö2012-09-13
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* os_support: Include io.h instead of direct.h on mingw32ceMartin Storsjö2012-09-13
| | | | | | | | Windows CE doesn't have neither mkdir nor _mkdir officially (only CreateDirectoryW), but mingw32ce has compat wrappers with these names (declared in io.h since direct.h is unavailable). Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegts: check substreams before discardingChristian Schmidt2012-09-12
| | | | | | Allow to extract the AC3 core from TrueHD with the "copy" codec. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Add a smooth streaming segmenter muxerMartin Storsjö2012-09-12
| | | | | | | | | | | | | | | | | This muxer splits the output from the ismv muxer into individual files, in realtime. The same can also be done by the standalone tool ismindex, but this muxer is needed for doing it in realtime (especially for live streams that need extra handling for updating the lookahead fields in the fragment headers). Using this muxer, one can deliver live smooth streaming from a normal static file web server. (Using ismindex, one can deliver premade smooth streaming files from a static file web server, or prepare files for serving with IIS.) Signed-off-by: Martin Storsjö <martin@martin.st>
* file: Add an avoption for disabling truncating existing files on openMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* img2dec: always close AVIOContextsTomas Härdin2012-09-12
| | | | | | Zero sized files would cause the contexts to leak away. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rtpdec_jpeg: Error out on other unsupported type values as wellMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Disallow using the reserved q valuesMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Fold the default qtables case into an existing if statementMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Store and reuse old qtables for q values 128-254Martin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Simplify the calculation of the number of qtablesMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Add more comments about the fields in the SOF0 sectionMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Clarify where the subsampling magic numbers come fromMartin Storsjö2012-09-12
| | | | | | | Write out the numbers the way they are constructed, not just the final values. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Don't use a bitstream writer for the EOI markerMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Don't needlessly use a bitstream writer for the headerMartin Storsjö2012-09-12
| | | | | | | | Everything written with this bitstream writer is 8/16 bit units (except for a pair of 4 bit values), so using a bitstream writer isn't necessary. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Simplify writing of the jpeg headerMartin Storsjö2012-09-12
| | | | | | | Generalize writing of any number of qtables. Don't manually write 16 bit values in two separate calls. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Merge two if statementsMartin Storsjö2012-09-12
| | | | | | This makes the code more readable and robust. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Write the DHT section properlyMartin Storsjö2012-09-12
| | | | | | | | | Currently the size header of the generated DHT section is incorrect, making the mjpeg decoder just skip it. Since the written huffman tables are the default ones, this failure had gone undetected. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Add support for default quantizersSamuel Pitoiset2012-09-11
| | | | | | | Generate quantization tables when they are not present in the first chunk. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: always set AVFMTCTX_NOHEADER.Anton Khirnov2012-09-11
| | | | New streams may be created at any time, e.g. on codec change.
* file: Use a normal private context for storing the file descriptorMartin Storsjö2012-09-10
| | | | | | Previously the file descriptor was stored in the priv_data pointer. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Depacketization of JPEG (RFC 2435)Samuel Pitoiset2012-09-09
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mov_chan: Only set the channel_layout if setting it to a nonzero valueMartin Storsjö2012-09-08
| | | | | | | | If regularly parsing new chan atoms (as in rtpdec_qt), but the chan atoms don't actually contain any channel layout, don't reset the value that the caller has filled in (by guessing). Signed-off-by: Martin Storsjö <martin@martin.st>
* mov_chan: Reindent an incorrectly indented lineMartin Storsjö2012-09-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mp2 muxer: mark as AVFMT_NOTIMESTAMPS.Carl Eugen Hoyos2012-09-07
| | | | Signed-off-by: Alex Converse <alex.converse@gmail.com>