1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-07 18:14:16 +02:00
Commit Graph

362 Commits

Author SHA1 Message Date
Hendrik Leppkes
c2f861ca42 Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
Michael Niedermayer
ce0834bdd6 avformat/flvdec: set broken_sizes for "metadatacreator : MEGA"
The 2nd size value is wrong for the sample file

Fixes: Ticket4903

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-12 05:36:39 +02:00
Michael Niedermayer
f4585e666f avformat/flvdec: Print stream type in case a new stream is discovered after the header
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-07 02:41:40 +02:00
Michael Niedermayer
e34ba5ec53 avformat/flvdec: Remove dead loop
Fixes CID1325682

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-06 01:22:35 +02:00
Michael Niedermayer
14f6c4356b avformat/flvdec: accept sizes if they are off by 11
This error was produced by rtmproto.c, it is possibly such streams
where dumped, this commit is needed to support them

Fixes: z0e.flv

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-02 20:18:53 +02:00
Thierry Foucu
7f72f2d75e libavformat/flvdec.c: free always the packet after a resync.
In case of resync, always free the packet, but retry only if the resync
did not get to the end of the file. Otherwise, there is a memory leak when the
last packet in the file is corrupted.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-29 04:01:50 +02:00
Michael Niedermayer
e3cf978cdd avformat/flvdec: Detect broken sizes (OBS 0.655b), disable resync for affected files
Fixes Ticket4867
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-19 18:34:55 +02:00
Michael Niedermayer
cbbd906be6 avformat/flvdec: Check that sizes match and resync if not
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-16 03:43:21 +02:00
Michael Niedermayer
3496a20bb9 avformat/flvdec: Change packet loop to return EAGAIN instead of looping until a valid packet is foud
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-16 03:32:27 +02:00
Michael Niedermayer
5629143433 avformat/flvdec: Use the first index entry to find the first packet if there was a parsing error in the header
Fixes: unknow_codec.flv

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-13 14:22:31 +02:00
Michael Niedermayer
fd6296e412 avformat/flvdec: Print last packet size at trace level
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-13 14:22:31 +02:00
Michael Niedermayer
6bed88ac78 avformat/flvdec: Print terminator value found if it differs from AMF_END_OF_OBJECT in AMF_DATA_TYPE_MIXEDARRAY
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-13 14:22:21 +02:00
Michael Niedermayer
29d147c94d Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'
* commit '059a934806d61f7af9ab3fd9f74994b838ea5eba':
  lavc: Consistently prefix input buffer defines

Conflicts:
	doc/examples/decoding_encoding.c
	libavcodec/4xm.c
	libavcodec/aac_adtstoasc_bsf.c
	libavcodec/aacdec.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.h
	libavcodec/asvenc.c
	libavcodec/avcodec.h
	libavcodec/avpacket.c
	libavcodec/dvdec.c
	libavcodec/ffv1enc.c
	libavcodec/g2meet.c
	libavcodec/gif.c
	libavcodec/h264.c
	libavcodec/h264_mp4toannexb_bsf.c
	libavcodec/huffyuvdec.c
	libavcodec/huffyuvenc.c
	libavcodec/jpeglsenc.c
	libavcodec/libxvid.c
	libavcodec/mdec.c
	libavcodec/motionpixels.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/noise_bsf.c
	libavcodec/nuv.c
	libavcodec/nvenc.c
	libavcodec/options.c
	libavcodec/parser.c
	libavcodec/pngenc.c
	libavcodec/proresenc_kostya.c
	libavcodec/qsvdec.c
	libavcodec/svq1enc.c
	libavcodec/tiffenc.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavcodec/utvideoenc.c
	libavcodec/vc1dec.c
	libavcodec/wmalosslessdec.c
	libavformat/adxdec.c
	libavformat/aiffdec.c
	libavformat/apc.c
	libavformat/apetag.c
	libavformat/avidec.c
	libavformat/bink.c
	libavformat/cafdec.c
	libavformat/flvdec.c
	libavformat/id3v2.c
	libavformat/isom.c
	libavformat/matroskadec.c
	libavformat/mov.c
	libavformat/mpc.c
	libavformat/mpc8.c
	libavformat/mpegts.c
	libavformat/mvi.c
	libavformat/mxfdec.c
	libavformat/mxg.c
	libavformat/nutdec.c
	libavformat/oggdec.c
	libavformat/oggparsecelt.c
	libavformat/oggparseflac.c
	libavformat/oggparseopus.c
	libavformat/oggparsespeex.c
	libavformat/omadec.c
	libavformat/rawdec.c
	libavformat/riffdec.c
	libavformat/rl2.c
	libavformat/rmdec.c
	libavformat/rtpdec_latm.c
	libavformat/rtpdec_mpeg4.c
	libavformat/rtpdec_qdm2.c
	libavformat/rtpdec_svq3.c
	libavformat/sierravmd.c
	libavformat/smacker.c
	libavformat/smush.c
	libavformat/spdifenc.c
	libavformat/takdec.c
	libavformat/tta.c
	libavformat/utils.c
	libavformat/vqf.c
	libavformat/westwood_vqa.c
	libavformat/xmv.c
	libavformat/xwma.c
	libavformat/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 23:15:19 +02:00
Vittorio Giovara
059a934806 lavc: Consistently prefix input buffer defines
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
Michael Niedermayer
00ebf89dcd Merge commit 'a7ac1a7b94447f33ae95be4d6d186e2775977f91'
* commit 'a7ac1a7b94447f33ae95be4d6d186e2775977f91':
  flv: Name an enum and use its type

Conflicts:
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 22:55:49 +02:00
Vittorio Giovara
a7ac1a7b94 flv: Name an enum and use its type 2015-06-12 17:02:49 +01:00
Igor Derzhavin
203f9c8ff0 libavformat/flvdec.c: don't build index_entries for input stream if AVIOContext is not seekable
Signed-off-by: Igor Derzhavin <igor.derzhavin@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 16:22:11 +02:00
Ganesh Ajjanagadde
a86928d2ab flvdec: fix lack of duration for some files
Fixes #4579

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-05 21:56:09 +02:00
Michael Niedermayer
108b738db1 avformat/flvdec: Show unknown tags at debug level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-05 21:56:09 +02:00
Michael Niedermayer
790a3cdf76 avformat/flvdec: Add TYPE_ONCAPTIONINFO
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-05 21:56:09 +02:00
Michael Niedermayer
b2fecce3c1 avformat/flvdec: increase buffer size for parsing metadata string key
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-05 21:55:45 +02:00
Michael Niedermayer
40d552dae6 Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'
* 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>
2015-04-20 03:19:47 +02:00
Vittorio Giovara
1a3eb042c7 Replace av_dlog with normal av_log at trace level
This applies to every library where performance is not critical.
2015-04-19 12:41:59 +01:00
Michael Niedermayer
3727cd5416 avformat/flvdec: add support for OnCaption 2015-03-13 16:25:27 +01:00
Michael Niedermayer
1df64d6c46 avformat/flvdec: re enable flv_data_packet()
Found-by: kurosu
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 16:24:12 +01:00
Michael Niedermayer
7869b2959d avformat/flvdec: Change subtitle stream type to subtitle type
Previous-version-reviewed-by: Andreas Cadhalpun
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 16:03:28 +01:00
Michael Niedermayer
a0fe1a25fa Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'
* commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e':
  avformat: Don't anonymously typedef structs

Conflicts:
	libavformat/adtsenc.c
	libavformat/aiffenc.c
	libavformat/avidec.c
	libavformat/gif.c
	libavformat/iff.c
	libavformat/img2dec.c
	libavformat/jvdec.c
	libavformat/matroskadec.c
	libavformat/udp.c
	libavformat/wtvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-14 21:07:40 +01:00
Diego Biurrun
daf8cf358a avformat: Don't anonymously typedef structs 2015-02-14 10:13:47 -08:00
Clément Bœsch
6a29499b95 avformat/flvdec: remove duplicated line error
Fix typo regression since 5c37ffca59

Found-By: cousin_luigi
2015-01-01 22:09:21 +01:00
Michael Niedermayer
efc4bfc195 avformat/flvdec: use named identifier instead of literal numbers as return values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-01 20:19:09 +01:00
Michael Niedermayer
eb767a276b avformat/flvdec: Increase string array size
Fixes parsing httphostheader of Scarlatti\,\ Pieter-Jan\ Belder\ -\ Sonata\ K113\ in\ A\ major\ -\ Alle.flv

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-01 18:16:04 +01:00
Michael Niedermayer
322f0f5960 avformat/flvdec: do not inject dts=0 metadata packets which failed to be parsed into a new data stream
Such data streams (which then contain no other packets except the faulty one)
confuse some user applications, like VLC
Works around vlcticket 12389

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-01 18:13:22 +01:00
Michael Niedermayer
5c37ffca59 avformat/flvdec: add several error messages to error conditions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-01 18:03:54 +01:00
Michael Niedermayer
91ea466551 avformat/flvdec: Use av_freep() avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 15:37:04 +01:00
Michael Niedermayer
0fadbd3623 avformat/flvdec: fix potential use of uninitialized variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-10 13:40:20 +01:00
Michael Niedermayer
b83beb131f Merge commit '40665d27e38e6a2f65037878202bd1a398c7683e'
* commit '40665d27e38e6a2f65037878202bd1a398c7683e':
  flvdec: Document how the duration is retrieved at the end of the file

Conflicts:
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 01:56:05 +01:00
Uwe L. Korn
40665d27e3 flvdec: Document how the duration is retrieved at the end of the file
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-24 23:34:30 +02:00
Michael Niedermayer
3099008f07 Merge commit '629b2ed0ac77d7c4bf1aeac5e70cafee5fa0fcae'
* commit '629b2ed0ac77d7c4bf1aeac5e70cafee5fa0fcae':
  flvdec: make sure to check create_stream and report the same error

Conflicts:
	libavformat/flvdec.c

See: d7d5b5dfc1
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-21 22:35:30 +02:00
Michael Niedermayer
1922357e5a Merge commit 'f22aa6b841dc54fa1dd804303885b1e230a5f629'
* commit 'f22aa6b841dc54fa1dd804303885b1e230a5f629':
  flvdec: avoid unitialized use of a struct member

See: 396ddcf22d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-21 22:27:17 +02:00
Vittorio Giovara
629b2ed0ac flvdec: make sure to check create_stream and report the same error
CC: libav-stable@libav.org
Bug-Id: CID 732242
2014-10-21 14:37:48 +01:00
Vittorio Giovara
f22aa6b841 flvdec: avoid unitialized use of a struct member
CC: libav-stable@libav.org
Bug-Id: CID 718141
2014-10-21 14:37:48 +01:00
Steven Liu
03efd73082 avformat/flvdec: read the correct bits into the tag type
from the flv spec, the flvtag define the tagtype as one byte,
the spec desc is:
Reserved  UB[2] Reserved for FMS, should be 0
Filter    UB[1] Indicates if packets are filtered.
                0 = No pre-processing required.
                1 = Pre-processing (such as decryption) of the packet is
                    required before it can be rendered.
                    Shall be 0 in unencrypted files, and 1 for encrypted
tags.
                    See Annex F. FLV Encryption for the use of filters.
TagType   UB[5] Type of contents in this tag. The following types are
                defined:
                        8 = audio
                        9 = video
                        18 = script data

Signed-off-by: Steven Liu <qi.liu@chinacache.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-04 14:54:23 +02:00
Michael Niedermayer
314c198413 Merge commit '0f789322efa78a672e4c3027e5cc12b8a947043a'
* commit '0f789322efa78a672e4c3027e5cc12b8a947043a':
  flvdec: update AVFormatContext.event_flags with METADATA_UPDATED whenever metadata changes.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 23:36:30 +02:00
Michael Niedermayer
9f97f7c546 Merge commit '93c04e095dc37ebdab22174e88cfa91e24940866'
* commit '93c04e095dc37ebdab22174e88cfa91e24940866':
  Expose metadata found in onCuePoint events in .flv files.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 23:14:23 +02:00
Andrew Stone
0f789322ef flvdec: update AVFormatContext.event_flags with METADATA_UPDATED whenever metadata changes.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:23:28 +00:00
Andrew Stone
93c04e095d Expose metadata found in onCuePoint events in .flv files.
Currently, only onMetaData is used, but some providers (wrongly)
put metadata into onCuePoint events, and it's still nice to be
able to use that data.

onCuePoint events also present metadata slightly differently than
onMetaData events: all metadata is found inside an object called
"parameters". In order to extract this metadata, it's easiest to
recurse through the object tree and pull out anything found in
child objects and put it in the top-level metadata.

Reference: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/2/help.html?content=00001404.html

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:11:43 +00:00
James Almer
d34ec64a22 replace calls to url_feof() with avio_feof()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-08 00:48:38 +02:00
Michael Niedermayer
afd62b3f18 Merge commit 'fa14804c83a7108a50c63d1f2180e30c75909529'
* commit 'fa14804c83a7108a50c63d1f2180e30c75909529':
  flv: Index the audio stream

Conflicts:
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-01 21:34:31 +02:00
Luca Barbato
fa14804c83 flv: Index the audio stream
And leverage the video index if the video is just disabled as wm4
did in an initial patch.
2014-08-01 15:04:51 +02:00
Michael Niedermayer
01b236b704 avformat/flvdec: use AV_PKT_DATA_NEW_EXTRADATA for h264 too
Fixes Ticket 3787

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-23 17:41:12 +02:00