Commit Graph

184 Commits

Author SHA1 Message Date
Michael Niedermayer
7ec5115409 avformat/nutenc: Omit AV_PKT_DATA_QUALITY_STATS when storing side data.
This side data does not serve or improve decoding the data, it thus
would semantically be metadata and not side data.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-25 18:39:17 +02:00
Michael Niedermayer
d66b623ad0 avformat/nutenc: Fix writing strings larger than 2gb
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 16:26:58 +02:00
Michael Niedermayer
7f03f75ce7 Merge commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a'
* commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a':
  libavformat: Use ffio_free_dyn_buf where applicable

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:48:50 +01:00
Martin Storsjö
8e32b1f096 libavformat: Use ffio_free_dyn_buf where applicable
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:47 +02:00
Timothy Gu
510b39c213 nutdec: Remove unused variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-06 20:44:36 +01:00
Michael Niedermayer
b44456c908 Merge commit '80a11de7dca315505bf203ce9c8c016e71724fd2'
* commit '80a11de7dca315505bf203ce9c8c016e71724fd2':
  nutenc: do not use has_b_frames

Conflicts:
	libavformat/nutenc.c
	tests/ref/lavf/nut
	tests/ref/seek/lavf-nut

Mostly not merged, this is simply not correct

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-27 17:52:06 +01:00
Anton Khirnov
80a11de7dc nutenc: do not use has_b_frames
It is unreliable, especially when the stream codec context is not the
encoding context. Use the codec descriptor properties instead.
2015-01-27 09:15:07 +01:00
Michael Niedermayer
3b537eab27 avformat/nutenc: store the actual r_frame_rate in the corresponding field if available
Fixes Ticket 3629 part3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 02:12:49 +01:00
Michael Niedermayer
dd3f1563d7 Merge commit 'b69183f65d0f6f4cd7a4e6c0deb57d59b0185aba'
* commit 'b69183f65d0f6f4cd7a4e6c0deb57d59b0185aba':
  nutenc: check for negative index rather than assert

Conflicts:
	libavformat/nutenc.c

Not merged, the assert is correct

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-22 00:09:00 +02:00
Vittorio Giovara
b69183f65d nutenc: check for negative index rather than assert
CC: libav-stable@libav.org
Bug-Id: CID 703721
2014-10-21 14:37:48 +01:00
Michael Niedermayer
2d70282254 Merge commit 'd754ed41727b1fcbab335b510248a9758a73320c'
* commit 'd754ed41727b1fcbab335b510248a9758a73320c':
  riffenc: take an AVStream instead of an AVCodecContext

Conflicts:
	libavformat/nutenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 17:47:12 +02:00
Anton Khirnov
d754ed4172 riffenc: take an AVStream instead of an AVCodecContext
It will be useful in the following commits.

Also, rename the AVCodecContext pointer name from 'stream' to 'codec'.
2014-06-18 15:03:55 +02:00
Michael Niedermayer
3a76d7f73d avformat/nutenc: cleaner version check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 16:36:41 +02:00
Michael Niedermayer
d7f398c542 avformat/nutenc: Fix error handling in nut_write_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 15:41:33 +02:00
Michael Niedermayer
2351ea8a2e avformat/nutenc: Fix error handling in write_sm_data()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 04:00:06 +02:00
Michael Niedermayer
8716605a26 avformat/nutenc: Suggest genpts if AV_NOPTS_VALUE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 18:49:25 +02:00
Michael Niedermayer
78a79a2ceb avformat/nutenc: replace conditional by assert
Its implied by sp_count==0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 04:26:18 +02:00
Michael Niedermayer
6d1aba6a29 avformat/nutenc: limit index table size if no index is going to be written
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 03:49:16 +02:00
Michael Niedermayer
82beb46e65 avformat/nutenc: add mode that omits the index
When the index is not written, several data tables become unneeded,
reducing memory and cpu requirements.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 03:37:37 +02:00
Michael Niedermayer
df889be0a8 nutenc: avoid av_tree_find() operation per syncpoint
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 03:20:04 +02:00
Michael Niedermayer
170a4d79c0 avformat/nutenc: bump minor version due to broadcast/pipe
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 01:44:02 +02:00
Michael Niedermayer
45daae06fd avformat/nutenc: change check to match comment
The code appears to assume STABLE will never change

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 01:41:56 +02:00
Michael Niedermayer
99b15f1daa avformat/nutenc: fix used version value
The broadcast/pipe flags arent stable + 1 they would be 4 or whenever but wouldnt change based
on which is stable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 01:40:07 +02:00
Michael Niedermayer
a8499cbbe8 Merge commit 'c94e2e85cb6af8a570d8542a830556243bd32873'
* commit 'c94e2e85cb6af8a570d8542a830556243bd32873':
  nut: Support experimental NUT 4 features

Conflicts:
	doc/nut.texi
	libavformat/nut.h
	libavformat/nutdec.c
	libavformat/nutenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 01:13:59 +02:00
Luca Barbato
c94e2e85cb nut: Support experimental NUT 4 features
Add the low overhead pipe mode and the extended broadcast mode.
Export the options as 'syncponts' since it impacts only that.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-05-28 22:04:56 +02:00
Michael Niedermayer
d524d424ec avformat/nutenc: switch to AVFMT_FLAG_BITEXACT
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-18 04:03:28 +02:00
Michael Niedermayer
4b8c599e84 avformat/nutenc: fix missing break in switch
Fixes CID1163848
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 04:17:15 +01:00
Michael Niedermayer
8113e838a8 avformat/nut: add support for per frame side & meta data with version 4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 14:13:31 +01:00
Michael Niedermayer
804ea14b35 avformat/nut: add minor_version field with version>=4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 02:03:19 +01:00
Michael Niedermayer
6aa50374bf avformat/nut: store version in the context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 02:03:08 +01:00
Michael Niedermayer
de2a2caf4d nutenc/write_index: warn if 2 consecutive keyframes have the same PTS and discard the 2nd
This fixes an assertion failure and regression and restores previous behaviour
Fixes Ticket3197

An alternative would be to fail hard in this case and refuse to mux such data.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 19:00:28 +01:00
Michael Niedermayer
ccdfa3e271 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Add missing #includes for *INT64_MAX and *INT64_C

Conflicts:
	ffmpeg.c
	ffmpeg_filter.c
	ffplay.c
	libavformat/assdec.c
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-24 05:21:19 +01:00
Diego Biurrun
8f8bc92365 Add missing #includes for *INT64_MAX and *INT64_C 2013-11-23 21:55:52 +01:00
Derek Buitenhuis
b1fcdc08ce nut: Fix unchecked allocations
CC: libav-stable@libav.org
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-22 17:09:56 +01:00
Derek Buitenhuis
55ae13e3de nut: Fix unchecked allocations
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-22 17:08:10 +01:00
Paul B Mahol
f2afe96181 avformat/nutenc: use av_reallocp_array()
Fixes memleak on allocation error.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-14 16:14:43 +00:00
Paul B Mahol
6a70feadb0 avformat/nutenc: use av_calloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-14 16:14:43 +00:00
Michael Niedermayer
2655c1ac12 Merge commit '6ff15cd569e1345bc3612fb69ad3003b104fe50d'
* commit '6ff15cd569e1345bc3612fb69ad3003b104fe50d':
  Remove unreachable returns

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-28 13:23:54 +02:00
Diego Biurrun
6ff15cd569 Remove unreachable returns 2013-07-27 16:00:41 +02:00
Michael Niedermayer
77c85cbd9d Merge commit '46c1917350f58dfab84e41919e6c02d43950db8c'
* commit '46c1917350f58dfab84e41919e6c02d43950db8c':
  nut: use a define for the nut version
  bgmc: Do not mark ff_bgmc_decode_init() as av_cold

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-06 10:41:43 +02:00
Luca Barbato
46c1917350 nut: use a define for the nut version
Ease switching version in the future and make evident why that value.
2013-05-06 09:14:43 +02:00
Michael Niedermayer
e39821a65e nutenc: only write an index if there are syncpoints
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-18 20:51:54 +01:00
Michael Niedermayer
076300bf8b Merge commit 'bfe5454cd238b16e7977085f880205229103eccb'
* commit 'bfe5454cd238b16e7977085f880205229103eccb':
  lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.h
  lavf: move "MP3 " fourcc from riff to nut
  fate: vpx: Add dependencies
  fate: Fix wavpack-matroskamode test dependencies
  x86: dsputilenc: port to cpuflags

Conflicts:
	libavformat/internal.h
	libavformat/nut.c
	tests/fate/vpx.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-29 13:45:57 +01:00
Justin Ruggles
bfe5454cd2 lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.h 2012-11-28 11:18:49 -05:00
Michael Niedermayer
cd37963684 Merge commit '381dc1a5ec0925b281c573457c413ae643567086'
* commit '381dc1a5ec0925b281c573457c413ae643567086':
  fate: ac3: Place E-AC-3 tests and AC-3 tests in different groups
  fate: Add shorthands for acodec PCM and ADPCM tests
  avconv: Drop unused function argument from do_video_stats()
  cmdutils: Conditionally compile libswscale-related bits
  aacenc: Drop some unused function arguments
  rtsp: Avoid a cast when calling strtol
  nut: support textual data
  nutenc: verbosely report unsupported negative pts

Conflicts:
	cmdutils.c
	ffmpeg.c
	libavformat/nut.c
	libavformat/nutenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-30 13:52:03 +01:00
Luca Barbato
07585ffa62 nutenc: verbosely report unsupported negative pts
Additionally use the correct error number.
2012-10-29 10:52:13 +01:00
Michael Niedermayer
c73fcc8de3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  yuv4mpeg: reject unsupported codecs
  nutenc: K&R formatting cosmetics
  assdec: fix qsort() callback signature
  configure: detect sparc64 automatically
  vp8: fix memset() crossing array boundary
  h264: fix invalid pointer arithmetic
  amrwbdec: fix invalid pointer arithmetic

Conflicts:
	libavformat/nutenc.c
	libavformat/yuv4mpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-28 14:24:27 +01:00
Luca Barbato
fce4450dec nutenc: K&R formatting cosmetics 2012-10-28 05:07:55 +01:00
Michael Niedermayer
db51c65961 Merge commit '1bd442c276e6688b43777a198cad0d7e3a92123f'
* commit '1bd442c276e6688b43777a198cad0d7e3a92123f':
  nut: prioritize native tags

Conflicts:
	tests/ref/lavfi/crop
	tests/ref/lavfi/crop_scale
	tests/ref/lavfi/crop_scale_vflip
	tests/ref/lavfi/crop_vflip
	tests/ref/lavfi/null
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_crop
	tests/ref/lavfi/pixfmts_hflip
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_pad
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip
	tests/ref/lavfi/scale200
	tests/ref/lavfi/scale500
	tests/ref/lavfi/vflip
	tests/ref/lavfi/vflip_crop
	tests/ref/lavfi/vflip_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 14:31:55 +02:00
Luca Barbato
1bd442c276 nut: prioritize native tags
Use native tags instead of avi ones, simplifies a lot raw video codecs
handling.
2012-10-13 12:33:18 +02:00