1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

329 Commits

Author SHA1 Message Date
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
Michael Niedermayer
dc5972f886 avformat/flvdec: give live_flvdec a separate name
This should fix a infinite loop on freebsd

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-21 20:27:45 +02:00
Michael Niedermayer
2fbdfba0f2 avformat/flvdec: Support live flv / NGINX RTMP streams
Fixes Ticket3553

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-16 23:43:11 +02:00
Michael Niedermayer
8225bf95bc Merge commit 'a1859032e39d96352687186fd179e1559dea2aca'
* commit 'a1859032e39d96352687186fd179e1559dea2aca':
  flvdec: Do not default to a video and audio stream

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 23:51:41 +02:00
Uwe L. Korn
a1859032e3 flvdec: Do not default to a video and audio stream
If no streams were indicated in the FLV header, do not automatically
allocate by default a video and an audio stream. Instead, in the case
that the header did not indicate the presence of any data, allocate no
stream until data actually arrives for one type.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-06-01 23:29:40 +03:00
Michael Niedermayer
e9ad121ba5 Fix skiping typos
Found-by: Alessandro Ghedini <alessandro@ghedini.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-27 14:50:14 +02:00
Michael Niedermayer
ca9cc6fdcc Merge commit '152b797cd687e96a582a1cb908dddf3d330d7637'
* commit '152b797cd687e96a582a1cb908dddf3d330d7637':
  flv: Do not mangle dts values for negative cts

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-24 21:50:28 +02:00
Michael Niedermayer
7da5ff5c18 Merge commit '5d983fdbca5570a1545a892583a372cfb3fffe92'
* commit '5d983fdbca5570a1545a892583a372cfb3fffe92':
  flv: Warn only once

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-24 21:37:26 +02:00
Michael Niedermayer
277ae5a7b3 Merge commit '374fdc8c071dcd96422378b0a1a0d453336d8a01'
* commit '374fdc8c071dcd96422378b0a1a0d453336d8a01':
  flv: Improve log messages

Conflicts:
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-24 21:27:09 +02:00
Luca Barbato
152b797cd6 flv: Do not mangle dts values for negative cts
Some applications really mean to send negative pts.
2014-04-23 21:20:17 +02:00
Luca Barbato
5d983fdbca flv: Warn only once
No point in sending the message multiple time.
2014-04-23 21:19:27 +02:00
Luca Barbato
374fdc8c07 flv: Improve log messages
Messages should start with a capital letter and possibly end with a "."
if they are statements.
2014-04-23 21:04:20 +02:00
Michael Niedermayer
b9017fdd42 avformat/flvdec: also include file position in debug output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-23 03:55:41 +02:00
Michael Niedermayer
dbc3e1109c avformat/flvdec: discard inconsistent timestamps
Fixes Ticket3425

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-12 01:50:41 +01:00
Michael Niedermayer
419787a2ff Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flv: Workaround for buggy Omnia A/XE encoder

Conflicts:
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-11 20:56:29 +01:00
Benjamin Larsson
547f834537 flv: Workaround for buggy Omnia A/XE encoder
The Omnia A/XE encoder writes the explicit extra data incorrectly
and wrongly disables parametric stereo. Truncating the extra data
by setting the size to 2 works around this. The AAC extra data
parser will then only parse the correct parts.

Bug-id: 599
2014-01-11 13:14:20 +01:00
Michael Niedermayer
396ddcf22d avformat/flvdec: initialize context before reading from it
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f9b8387069e_5377_flv_with_pcm_s16be_audio_track.flv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-10 20:59:25 +01:00
Michael Niedermayer
d8d5258bb7 avformat/flvdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:24:09 +01:00
Alex Sukhanov
cc0e2ba1aa Enable parser in FLV demuxer for H264 codec
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 04:18:13 +01:00
Paul B Mahol
a688176535 avformat/flvdec: use avpriv_request_sample()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-18 09:55:16 +00:00
Paul B Mahol
a807c68253 avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-13 20:13:38 +00:00
Michael Niedermayer
09e06cd90f Merge commit 'c951e4b442df9dde6051634a85359eb809bf2142'
* commit 'c951e4b442df9dde6051634a85359eb809bf2142':
  flv: Make onTextData parsing robust

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 11:56:29 +02:00
Luca Barbato
c951e4b442 flv: Make onTextData parsing robust
Certain streaming servers do not preserve the order of the fields.
2013-09-22 01:10:17 +02:00
Michael Niedermayer
22f79a2d60 Merge commit '0a9425d7cfdf0113c3d32096c9406823efe0cd0a'
* commit '0a9425d7cfdf0113c3d32096c9406823efe0cd0a':
  flv: Do not export datastream as metadata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:44:02 +02:00
Luca Barbato
0a9425d7cf flv: Do not export datastream as metadata
It is used internally.
2013-09-16 19:36:37 +02:00
Michael Niedermayer
946902e5b9 Merge commit 'f4634ae8a83d13a1abf3baac8956a3111aa09ed2'
* commit 'f4634ae8a83d13a1abf3baac8956a3111aa09ed2':
  flv: Fix the help string

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-28 12:03:06 +02:00
Luca Barbato
f4634ae8a8 flv: Fix the help string 2013-08-27 14:38:54 +02:00
Michael Niedermayer
61a28d00e8 flvdec: silence unused warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 13:05:16 +02:00
Michael Niedermayer
67291ffd63 Merge commit 'f900f35ac8db4ac30df6fda1c27502c2ef9e6ba5'
* commit 'f900f35ac8db4ac30df6fda1c27502c2ef9e6ba5':
  flvdec: Eliminate completely silly goto

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 12:19:21 +02:00
Michael Niedermayer
ae48547a52 Merge commit 'e4529df944616917ae8462f5102253ff7f983093'
* commit 'e4529df944616917ae8462f5102253ff7f983093':
  flvdec: K&R formatting cosmetics

Conflicts:
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 12:08:56 +02:00
Michael Niedermayer
cb73f84087 Merge commit '390b4d7088b5cecace245fee0c54a57e24dabdf4'
* commit '390b4d7088b5cecace245fee0c54a57e24dabdf4':
  flvdec: Fix = vs. == typo in sample rate check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 11:00:50 +02:00
Diego Biurrun
f900f35ac8 flvdec: Eliminate completely silly goto 2013-08-01 12:43:54 +02:00
Diego Biurrun
e4529df944 flvdec: K&R formatting cosmetics 2013-08-01 12:43:53 +02:00
Diego Biurrun
390b4d7088 flvdec: Fix = vs. == typo in sample rate check 2013-08-01 12:43:53 +02:00