Commit Graph

2133 Commits

Author SHA1 Message Date
Christophe Gisquet
33fefdb449 ffmpeg: fix streamcopy with side data
The issue is that, when the main packet data buffer is changed, streamcopy
uses a temporary new packet to store that buffer, frees the old packet, and
replace it with the new packet.

However, in doing so, it forgets about the side data, which gets freed, but
is still needed and referenced. Then, when the packet gets freed again in
the normal code path, it attempts to free its side data which has already
been freed.

Therefore, simply avoid the first free on side data by removing that side
data from the packet.

Fixes ticket #3773.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 03:43:17 +02:00
Michael Niedermayer
097bf149c9 Merge commit 'aa51b0492bfced6d650fb5ff419e2b13fde6833d'
* commit 'aa51b0492bfced6d650fb5ff419e2b13fde6833d':
  avconv: rename output_packet() to process_input_packet()

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 00:23:30 +02:00
Michael Niedermayer
7d03732f7e ffmpeg: Do not fail if a demuxer and decoder use the same option identifer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 13:33:44 +02:00
Michael Niedermayer
01c17b5224 ffmpeg: Fix copying timebase to muxer context
Fixes Ticket3741

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-15 15:51:31 +02:00
Michael Niedermayer
8bbadc9b6e ffmpeg: Use av_stream_get_parser() to avoid ABI issues
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-14 21:17:20 +02:00
Michael Niedermayer
59975de777 ffmpeg: fix integer overflows with sub->*display_time
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-12 02:23:48 +02:00
Michael Niedermayer
9098f0ecd7 ffmpeg: remove common factors from copied timebase
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 21:51:31 +02:00
Michael Niedermayer
8e7c8325d2 Merge commit '3f3232a371cc88696184d9aef1f812656264e56c'
* commit '3f3232a371cc88696184d9aef1f812656264e56c':
  avconv: set the output stream timebase

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 21:44:25 +02:00
Michael Niedermayer
4930cd13d6 ffmpeg: check av_opt_set_dict() return
Fixes CID1224275

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-02 05:53:13 +02:00
Sergey
6d2df3c00a ffmpeg: fix deadlock regression in threading error handing
Commit fc9c857c introduced deadlock regression when processing too many inputs:
  ffmpeg $(seq -f " -f lavfi -i aevalsrc=0:d=%.0f" 70) -vf concat=n=70:v=0:a=1 -f null -
Happens for different number of inputs, depending on available memory size,
overcommit settings, ulimits, etc. Easily noticeable for 32-bit builds,
that exhaust address space allocating 8-10 MB stack for each thread.
Earlier ffmpeg versions exited with unhelpful "Conversion failed!" message.

This patch fixes both problems: it frees the queue to prevent deadlock
and adds a meaningful error message if pthread_create() fails.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-27 17:45:38 +02:00
Michael Niedermayer
c69f729947 ffmpeg: fix reinitializing with threads while flushing
With threads the decoder has a delay and will thus have multiple
frames at EOF left in its buffers which will be returned when flushing
the decoder. The code that extracts such frames from the decoder at the
end does not pull frames from the filtergraph, thus when one of these
frames causes the filtergraph to be reinited, the frames still inside
the graph at that point re lost

This commit changes the flushing to be more similar to normal decoding
and 1 frame at a time

Fixes hqx fate with threads

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 00:09:09 +02:00
Anshul Maheshwari
7e6cf36453 ffmpeg: fix transcoding dvbsub to dvbsub
fix ticket #2024

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-22 21:07:40 +02:00
Anshul Maheshwari
3639343478 ffmpeg: fix memleak and corruption of AVSubtitle with multiple outputs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-21 13:21:08 +02:00
Michael Niedermayer
afa7ab557a Merge commit '452860d7e056f9a894cac2fe52cdedeae4c38251'
* commit '452860d7e056f9a894cac2fe52cdedeae4c38251':
  Use av_packet_rescale_ts() to simplify code.

Conflicts:
	doc/examples/muxing.c
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-20 17:03:58 +02:00
Michael Niedermayer
fa0d0fb42e Merge commit '71d6551e674c86d07c165439c2bf6613b3892307'
* commit '71d6551e674c86d07c165439c2bf6613b3892307':
  avconv: use the correct variable in comparison

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-17 12:58:16 +02:00
Michael Niedermayer
5ded0b390b ffmpeg: for h264 we need has_b_frames from the decoder
Other solutions welcome

Fixes Ticket3711

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-14 23:32:08 +02:00
Michael Niedermayer
378ad22492 ffmpeg: print values of mismatching has_b_frames
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-14 23:09:21 +02:00
Michael Niedermayer
10012fa961 ffmpeg: Fix bitstream filters manipulating AVCodecContext
Fixes Ticket3715

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-14 00:50:50 +02:00
Michael Niedermayer
52ce6be86b Merge commit '48e50921337984ba4ec2c1cafe45d43787f84498'
* commit '48e50921337984ba4ec2c1cafe45d43787f84498':
  avconv: make -shortest work with streamcopy

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-12 13:13:12 +02:00
Michael Niedermayer
27856b2fe9 ffmpeg: prevent pts < dts to be passed through to the muxer on stream copy
Fixes Ticket3658

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-05 18:37:32 +02:00
Michael Niedermayer
0efe3be71d Merge commit '39ec5e1cf8444f827c42effb76e5694e091bbff3'
* commit '39ec5e1cf8444f827c42effb76e5694e091bbff3':
  avconv: Report the codec and the encoder separately

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-04 20:08:22 +02:00
Lou Logan
88f2586adb fix various typos
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 10:58:19 -08:00
Michael Niedermayer
137c5e115b ffmpeg: try to use the more fitting of the 2 encoder contexts
This fixes the interactively enabled encoder debug by pressing 'D'

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 19:48:25 +02:00
Michael Niedermayer
576654302b ffmpeg: use av_log_ask_for_sample() instead of duplicating avpriv_request_sample() 2014-06-03 16:05:37 +02:00
Michael Niedermayer
2422a7ffe4 Loose mplayer in MPlayer/incoming/
Found-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 16:03:44 +02:00
Michael Niedermayer
3e7b4b9fbd Add direct link to ML in missing_feature_sample()
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 15:58:27 +02:00
Michael Niedermayer
768ef0f19e ffmpeg: request sample if the decoder & demuxer has_b_frames mismatch
We cannot use avpriv_request_sample() as this is private to the libs
or rather it would be a bad usage example

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 15:24:00 +02:00
Michael Niedermayer
a0b2de77ed ffmpeg: remove "has_b_frames" backpassing
It seems working without this now for the files i tested it with, if this causes
a regression, dont hesitate to put the line back or open a ticket or fix (if possible)
the parser

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 15:23:43 +02:00
Michael Niedermayer
00dcb10631 ffmpeg: Fix encoder names in printout
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 17:15:56 +02:00
Michael Niedermayer
0949bbc431 ffmpeg: fix for-muxer AVCodecContext stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 17:15:55 +02:00
Michael Niedermayer
862120f980 Merge commit '383136264ef40452efd86cafb2d7221cd3830b3d'
* commit '383136264ef40452efd86cafb2d7221cd3830b3d':
  avconv: do not use the stream codec context for encoding

Conflicts:
	ffmpeg.c
	ffmpeg_opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 15:53:23 +02:00
Michael Niedermayer
a87685d8e8 ffmpeg: add note about why has_b_frame is copied and when it can be removed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 15:32:50 +02:00
Michael Niedermayer
921d5ae3bc ffmpeg: replace remaining, ffmpeg specific ist->st->codec by ist->dec_ctx
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 15:30:51 +02:00
Michael Niedermayer
9fb45334fc ffmpeg: copy b frame codec delay back from decoder to demuxer
The demuxer needs this value to generate correct timestamps in some corner cases
Ideally the parser would always set this correctly, but some parsers lac support
for extracting this value, also its not trivial.
This fixes a regression

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 15:30:15 +02:00
Michael Niedermayer
d097935767 Merge commit '41776ba9c0ebbb71394cefdf7dd1b243e6c852d5'
* commit '41776ba9c0ebbb71394cefdf7dd1b243e6c852d5':
  avconv: do not use the stream codec context for decoding

Conflicts:
	ffmpeg.c
	ffmpeg_filter.c
	ffmpeg_opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 14:35:53 +02:00
Michael Niedermayer
b3f4615081 ffmpeg: fix check for muxing overhead being unknown
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 23:39:54 +02:00
Nicolas George
fc9c857c2d ffmpeg: use thread message API. 2014-05-26 11:40:21 +02:00
Michael Niedermayer
1f359c8559 ffmpeg: use av_stream_get_end_pts()
Simplifies code and should correct timing values when -*sync drop is used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 18:53:42 +02:00
Michael Niedermayer
b2a8bc3d04 ffmpeg/set_encoder_id: dont allocate encoder string if one is already set
Fixes memleak

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-20 00:51:47 +02:00
Lukasz Marek
4d686674b2 ffmpeg: use av_fifo_alloc_array
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-05-20 00:00:44 +02:00
Michael Niedermayer
833ec9177d ffmpeg/do_video_stats: fix used timebase
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-19 20:54:27 +02:00
Michael Niedermayer
dad54e4a62 ffmpeg: set dts for subtitles
dts is not optional, its required for muxing,
previously it was set from AVStream.pts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-19 16:07:50 +02:00
Michael Niedermayer
87f5ede6b5 ffmpeg: add last_mux_dts_plus_duration
Fixes 1 frame error in the duration and derived values,
introduced by not using AVStream.pts in the previous commit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-19 15:35:20 +02:00
Michael Niedermayer
2de2b991ca Merge commit 'dc40d88625d7e402d58ac3f3df69fbf27aa31ea0'
* commit 'dc40d88625d7e402d58ac3f3df69fbf27aa31ea0':
  avconv: do not use poorly defined and undocumented AVStream.pts

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-19 15:13:16 +02:00
Olivier Langlois
76191c08f8 ffmpeg: Use av_gettime_relative()
Whenever av_gettime() is used to measure relative period of time,
av_gettime_relative() is prefered as it guarantee monotonic time
on supported platforms.

Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-19 02:35:07 +02:00
Michael Niedermayer
0c152fe916 ffmpeg: prefix encoder with "Lavc " in bitexact mode
This avoids misleading encoder names like "encoder = prores"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-18 22:57:20 +02:00
Michael Niedermayer
bbee02ed9c ffmpeg: Skip writing the version when -flags bitexact is used
Alternatively every fate test could be changed to pass both fflags and flags +bitexact

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-18 22:00:00 +02:00
Michael Niedermayer
1e49439f04 Merge commit '6656370b858329ca07a60a2de954d5e90daa0206'
* commit '6656370b858329ca07a60a2de954d5e90daa0206':
  avconv: set the "encoder" tag when transcoding

Conflicts:
	ffmpeg.c
	tests/ref/lavf/mkv
	tests/ref/seek/lavf-mkv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-18 21:31:51 +02:00
Michael Niedermayer
8334850a99 Merge commit '93afb6c98df876b15e3d911a9450ad55f92080ce'
* commit '93afb6c98df876b15e3d911a9450ad55f92080ce':
  avconv: set output avg_frame_rate when known

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-18 14:38:36 +02:00
Michael Niedermayer
e9602dcb4d ffmpeg: bitstream filters require split out side data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-15 22:41:12 +02:00
Lukasz Marek
a5f2f33a67 ffmpeg: use av_fifo_freep
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-05-07 23:39:47 +02:00
Michael Niedermayer
d5ec1ddf7b Merge commit '9580818c5d934bde65a95efd2cee61c174721092'
* commit '9580818c5d934bde65a95efd2cee61c174721092':
  avconv: rename OutputStream.opts to OutputStream.encoder_opts

Conflicts:
	ffmpeg.c
	ffmpeg.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-05 15:51:55 +02:00
Michael Niedermayer
22ffa5390f Merge commit '01947f07b81a57fb1e15114b710f6d5ae4f70a11'
* commit '01947f07b81a57fb1e15114b710f6d5ae4f70a11':
  avconv: remove a useless line

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-05 15:09:55 +02:00
Michael Niedermayer
1efc089218 Merge commit '65ed9e7585e86e6c728bc762ac9944b157e39f8d'
* commit '65ed9e7585e86e6c728bc762ac9944b157e39f8d':
  avconv: rename 'codec' to 'enc_ctx'

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-05 15:03:52 +02:00
Michael Niedermayer
1f40536cca Merge commit '650a5206a944fd36a42d92f98e745972056b1f7c'
* commit '650a5206a944fd36a42d92f98e745972056b1f7c':
  avconv: rename 'icodec' to 'dec_ctx'

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-05 14:55:26 +02:00
Michael Niedermayer
42b7bda41a Merge commit 'f3a6ad22c977c8fea87c4c5e4535061db6324d66'
* commit 'f3a6ad22c977c8fea87c4c5e4535061db6324d66':
  avconv: rename InputStream.opts to InputStream.decoder_opts

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-05 14:44:33 +02:00
Michael Niedermayer
6e39707438 Merge commit '73ed8558a61c4f1d0ce8d1f35183ac1a0a4e31e3'
* commit '73ed8558a61c4f1d0ce8d1f35183ac1a0a4e31e3':
  avconv: simplify exit_program() by using more local vars

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-05 14:39:13 +02:00
Michael Niedermayer
a3477fef2b ffmpeg: put the sizeof() second in av_malloc_array()
This is purely a cosmetic change
Suggested-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-01 22:01:38 +02:00
Michael Niedermayer
feaa31d354 ffmpeg: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-01 02:23:08 +02:00
Michael Niedermayer
ed72dae4cf ffmpeg: dont print "Conversion failed" if conversion has never started
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-29 23:45:22 +02:00
Michael Niedermayer
fed0acebad ffmpeg: print an error at the end if conversion failed
Fixes Ticket3477

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-29 00:09:08 +02:00
Michael Niedermayer
3bf189bb00 Merge commit '1ae8198bca749a0cff205196cc83d35b9962849b'
* commit '1ae8198bca749a0cff205196cc83d35b9962849b':
  avconv: always reset packet pts after decoding an audio frame

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-22 13:45:34 +02:00
Michael Niedermayer
e48fb4e1a5 ffmpeg: fix mixed merged & split side data with the stream->packet hack
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-18 01:01:38 +02:00
Michael Niedermayer
517cc81e93 ffmpeg: stop protocols on interrupt when no transcoding has happened yet
Fixes Ticket3344

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 22:29:23 +02:00
Michael Niedermayer
506064ed10 ffmpeg: frame droping due to fps should not be a warning
This reverts part of 41e7e46cac

See: http://thread.gmane.org/gmane.comp.video.ffmpeg.user/51229
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 21:15:31 +02:00
Michael Niedermayer
41e7e46cac Merge commit 'aa499568afc01d59215eef7e5b14b949a9671afc'
* commit 'aa499568afc01d59215eef7e5b14b949a9671afc':
  avconv: More descriptive message about framedrop

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-25 19:25:10 +01:00
Michael Niedermayer
cb640eb335 ffmpeg: move packet deallocation into write_frame
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 19:50:39 +01:00
Michael Niedermayer
33a7e288ab Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: don't warn on multiple frames per packet for codecs that expect it

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 16:46:06 +01:00
Michael Niedermayer
1046cd60d4 Merge commit '4754345027eb85cfa51aeb88beec68d7b036c11e'
* commit '4754345027eb85cfa51aeb88beec68d7b036c11e':
  avconv: print verbose per-stream transcoding statistics

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 16:40:35 +01:00
Michael Niedermayer
afa442c198 Merge commit 'a220b07b0f971f88213aef012aea51af2800be62'
* commit 'a220b07b0f971f88213aef012aea51af2800be62':
  avconv: split printing the final statistics into a separate function

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 16:30:29 +01:00
Michael Niedermayer
13278b97ae Merge commit 'baeb59d89beda499688e528c6a269d2b255b66f2'
* commit 'baeb59d89beda499688e528c6a269d2b255b66f2':
  avconv: rewrite output data size tracking

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 16:11:13 +01:00
Michael Niedermayer
8a9878b4ff Merge commit 'f759f66e367bc62ed7738a51040f775b656a60d8'
* commit 'f759f66e367bc62ed7738a51040f775b656a60d8':
  avconv: explicitly report when the muxing overhead is unknown

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 15:52:50 +01:00
Michael Niedermayer
82e6660ae2 Merge commit '59444c76e6d43529a12dbd80b6dd29c6ba4079a9'
* commit '59444c76e6d43529a12dbd80b6dd29c6ba4079a9':
  avconv: add stream-global side data to the first demuxed packet

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 14:44:22 +01:00
Nicolas George
521707d42e ffmpeg: sub2video: send a last blank frame before closing.
Fix trac ticket #3420.
2014-03-23 19:16:35 +01:00
Michael Niedermayer
9dca02ee54 ffmpeg: dont call exit_program() from a signal hander
This is unsafe and can deadlock amongth other things

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-21 17:09:56 +01:00
Michael Niedermayer
d3ed8a4d2b ffmpeg: try to avoid calling av_log() from sigterm_handler()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-20 16:24:17 +01:00
Michael Niedermayer
4d17179b37 ffmpeg: fix printing INT64_MIN pts at the end
Fixes Ticket3427

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-16 06:26:40 +01:00
Michael Niedermayer
b79dfd16cb ffmpeg: dont try to run the subtitle encoder on non subtitle streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-03 21:06:24 +01:00
Michael Niedermayer
70a25587d2 Merge commit '67f2a688143b644f99360565a9f36c61a5f052e9'
* commit '67f2a688143b644f99360565a9f36c61a5f052e9':
  avconv: remove a write-only variable

Conflicts:
	ffmpeg.c
	ffmpeg.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-24 21:08:19 +01:00
Michael Niedermayer
f2387152bc Merge commit '5c79d2e12d13959fc6aed92d102c25194a06de05'
* commit '5c79d2e12d13959fc6aed92d102c25194a06de05':
  avconv: Do not divide by zero

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-20 23:59:09 +01:00
Nicolas George
299a56879d ffmpeg: make reading packets from thread blocking.
If a packet is not ready on the input selected by ffmpeg,
it will read from another input instead. If that happens
repeatedly, frames will accumulate somewhere later in the
processing to ensure streams synchronization. It can happen
in particular when reading from a slow medium or an
expensive lavfi filter graph.

Make reading from normal demuxers on non-streamed data and
from the lavfi pseudo-device blocking to avoid that.

Should fix trac ticket #3079.
2014-02-20 11:22:55 +01:00
Michael Niedermayer
3734c3ea51 ffmpeg: reduce frame rate for mpeg4 to be within the spec limits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-19 18:40:27 +01:00
Michael Niedermayer
3868e97c6b ffmpeg: fix vstats
Broken by: 394fb56c29
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-10 20:31:06 +01:00
Stefano Sabatini
290da7e754 ffmpeg: tweak debug_ts logging and add more of it
Help with debugging timestamp issues.
2014-02-02 13:11:52 +01:00
Michael Niedermayer
2e02d71237 ffmpeg: print data size too in statistic
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 01:36:47 +01:00
Michael Niedermayer
be7b76230f ffmpeg: also count data streams bytes
Fixes wrong error message about empty output file

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 20:17:10 +01:00
Stefano Sabatini
9651239f67 ffmpeg: use intermediary variables in reap_filters, increase readability 2014-01-26 18:06:39 +01:00
Stefano Sabatini
094516a5d0 ffmpeg: use av_err2str() macro
Simplify.
2014-01-23 16:29:44 +01:00
Stefano Sabatini
9f956d9d8d ffmpeg: apply misc cosmetics to process_input() code 2014-01-23 16:29:39 +01:00
Michael Niedermayer
740e6042a0 ffmpeg: change ost->finished to an enum
Idea-by: ramiro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-17 23:57:02 +01:00
Michael Niedermayer
d73f897669 ffmpeg: update statistics only when a packet is actually muxed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-17 23:47:39 +01:00
Michael Niedermayer
5c459504f6 ffmpeg/flush_encoders: dont mux packets once ost->finished has been set
Fixes muxing frames after av_interleaved_write_frame() failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-17 23:47:38 +01:00
Michael Niedermayer
706741e8d7 ffmpeg: properly close down muxers on av_interleaved_write_frame() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-17 23:47:38 +01:00
Michael Niedermayer
4ff77d4451 ffmpeg: check ost->finished in check_output_constraints()
No testcase but it seems logic to stop when finished is set

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-17 23:47:37 +01:00
Michael Niedermayer
7d91fb305e ffmpeg: check ost->finished in reap_filters()
This avoids finished output streams continuing to receive frames

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-17 23:47:36 +01:00
Michael Niedermayer
206c06d96f Merge commit '2ce8bca51f7264b47027f69d50dd8e49aa2fd683'
* commit '2ce8bca51f7264b47027f69d50dd8e49aa2fd683':
  avconv: print a warning when falling back to default 25fps

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-17 16:11:53 +01:00
Michael Niedermayer
88956f73f2 ffmpeg: use timestamp from before and after the decoder to detect backward moving dts for discontinuity detection
This should make discontinuity detection more robust and detect
more cases. Timestamps after the decoder can be delayed due to threads,
timestamps before can be missing

no testcase available/known

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 19:48:00 +01:00
Jan Gerber
200cfab8c4 remuxing .opus files to .webm codec->delay must be copied too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 23:43:14 +01:00
Michael Niedermayer
e22e943ef9 Merge commit '674fa49110a661694188a958be13d529b7c8c5dd'
* commit '674fa49110a661694188a958be13d529b7c8c5dd':
  avconv: do not call avcodec_get_frame_defaults()

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 23:36:10 +01:00
Michael Niedermayer
4cbf3eb9e6 Merge commit 'eb891b3114f499e96b9faddd0b0ae856345dfbd9'
* commit 'eb891b3114f499e96b9faddd0b0ae856345dfbd9':
  Replace all uses of avcodec_free_frame with av_frame_free().

Conflicts:
	doc/examples/decoding_encoding.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 23:18:51 +01:00