Commit Graph

20 Commits

Author SHA1 Message Date
cyberbox
3b0fb00990
upgrade ffmpeg from 4.4.1 to 5.1.4
Signed-off-by: cyberbox <468042667@qq.com>
Change-Id: I63cc2a8c9ff6197c67d6b6b47c124882ad942a22
2024-04-25 17:20:18 +08:00
vvtest
df7caf8708
ffmpeg回退
Signed-off-by: vvtest <815508462@qq.com>
2024-02-05 11:18:57 +00:00
vvtest
e022934105
ffmpeg升级
Signed-off-by: vvtest <815508462@qq.com>
2024-01-24 09:12:57 +00:00
gg0907
65994f5530 upgrade to 4.4.1
Signed-off-by: gg0907 <guohui_1701@163.com>
2022-05-23 11:23:35 +08:00
Andreas Rheinhardt
f02b1b1222 avcodec/encode: Remove ff_alloc_packet
It is no longer used anymore.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-06-01 14:52:26 +02:00
James Almer
cde7818d9f avcodec/frame_thread_encoder: remove usage of avcodec_encode_video2()
Call the encoder's internal AVCodec.encode2() function instead.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-05-25 12:46:22 -03:00
Anton Khirnov
f30a41a608 Stop hardcoding align=32 in av_frame_get_buffer() calls.
Use 0, which selects the alignment automatically.
2020-05-22 14:38:57 +02:00
James Almer
73ee53f317 avcodec/encode: add missing assert to avcodec_receive_packet()
Encoders must return reference counted packets.

This was checked only for encoders using the AVCodec->encode2() API, while
blindly accepting whatever encoders using the AVCodec->receive_packet() API
were returning.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-14 12:30:51 -03:00
Marton Balint
686755f02b avcodec/encode: only allow undersized audio frames if they are the last
Otherwise the user might get a silence padded frame in the beginning or in the
middle of the encoding.

Some other bug uncovered this:

./ffmpeg -loglevel verbose -y -f data -i /dev/zero \
-filter_complex "nullsrc=s=60x60:d=10[v0];sine=d=10[a]" \
-map '[v0]' -c✌️0 rawvideo \
-map '[a]'  -c🅰️0 mp2 \
-f mpegts out.ts

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-08-11 22:32:42 +02:00
Zhong Li
d91370e0f1 lavc/encode: fix frame_number double-counted
Encoder frame_number may be double-counted if some frames are cached and then flushed.
Take qsv encoder (some frames are cached firsty for asynchronism) as example,
./ffmpeg -loglevel verbose -hwaccel qsv -c:v h264_qsv -i in.mp4 -vframes 100 -c:v h264_qsv out.mp4
frame_number passed to encoder is double-counted and larger than the accurate value.
Libx264 encoding with B frames can also reproduce it.

Signed-off-by: Zhong Li <zhong.li@intel.com>
2018-08-27 16:54:40 +08:00
Jun Zhao
c9ed7f0024 lavc/encode: remove redundant av_init_packet after av_packet_unref.
remove redundant av_init_packet after av_packet_unref.
av_packet_unref have call av_init_packet and reset the packet size.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-23 19:17:16 +08:00
James Almer
e61d8b82a2 avcodec/encode: use av_packet_make_refcounted to ensure packets are ref counted
Simplifies code.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-01 23:40:42 -03:00
James Almer
d2484639bc Merge commit '48bb0da050329e5111b00a12dfc154b7e78fb3a3'
* commit '48bb0da050329e5111b00a12dfc154b7e78fb3a3':
  lavc: Drop deprecated way of setting audio delay on encode

Merged-by: James Almer <jamrial@gmail.com>
2017-10-23 16:38:04 -03:00
James Almer
87e625c263 avcodec/encode: do proper cleanup on failure
Fixes the last remaining memleaks introduced by a22c6a4796.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-03 14:00:27 -03:00
James Almer
712ee85816 avcodec/encode: free non-referenced packets' side data in the old encode API functions
Fixes memleaks introduced by a22c6a4796.
2017-10-02 18:58:53 -03:00
James Almer
a22c6a4796 avcodec/encode: remove usage of av_dup_packet()
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-02 11:14:57 -03:00
Muhammad Faiz
31f61b0d4f avcodec: do not use AVFrame accessor
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-04-23 14:27:47 +07:00
James Almer
bd9057e74b Merge commit '328cd2b599bc2d0d38f3c12606fa2a66eeec016e'
* commit '328cd2b599bc2d0d38f3c12606fa2a66eeec016e':
  lavc: move encoding-related code from utils.c to a new file

Merged-by: James Almer <jamrial@gmail.com>
2017-04-07 00:42:38 -03:00
Vittorio Giovara
48bb0da050 lavc: Drop deprecated way of setting audio delay on encode
Deprecated in 08/2014.
2017-03-23 10:09:16 +01:00
Anton Khirnov
328cd2b599 lavc: move encoding-related code from utils.c to a new file 2016-11-29 10:39:20 +01:00