mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
Add an ARES atom to extradata when encoding avui.
Allows playback with QuickTime and the original codec. Tested by Olaf Matthes, olaf matthes gmx de
This commit is contained in:
parent
72db3c79df
commit
3ea97767e4
@ -22,6 +22,7 @@
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "internal.h"
|
||||
#include "libavutil/intreadwrite.h"
|
||||
|
||||
static av_cold int avui_encode_init(AVCodecContext *avctx)
|
||||
{
|
||||
@ -29,15 +30,19 @@ static av_cold int avui_encode_init(AVCodecContext *avctx)
|
||||
av_log(avctx, AV_LOG_ERROR, "Only 720x486 and 720x576 are supported.\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
if (!(avctx->extradata = av_mallocz(24 + FF_INPUT_BUFFER_PADDING_SIZE)))
|
||||
if (!(avctx->extradata = av_mallocz(144 + FF_INPUT_BUFFER_PADDING_SIZE)))
|
||||
return AVERROR(ENOMEM);
|
||||
avctx->extradata_size = 24;
|
||||
avctx->extradata_size = 144;
|
||||
memcpy(avctx->extradata, "\0\0\0\x18""APRGAPRG0001", 16);
|
||||
if (avctx->field_order > AV_FIELD_PROGRESSIVE) {
|
||||
avctx->extradata[19] = 2;
|
||||
} else {
|
||||
avctx->extradata[19] = 1;
|
||||
}
|
||||
memcpy(avctx->extradata + 24, "\0\0\0\x78""ARESARES0001""\0\0\0\x98", 20);
|
||||
AV_WB32(avctx->extradata + 44, avctx->width);
|
||||
AV_WB32(avctx->extradata + 48, avctx->height);
|
||||
memcpy(avctx->extradata + 52, "\0\0\0\x1\0\0\0\x20\0\0\0\x2", 12);
|
||||
|
||||
avctx->coded_frame = av_frame_alloc();
|
||||
if (!avctx->coded_frame) {
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#define LIBAVCODEC_VERSION_MAJOR 56
|
||||
#define LIBAVCODEC_VERSION_MINOR 21
|
||||
#define LIBAVCODEC_VERSION_MICRO 100
|
||||
#define LIBAVCODEC_VERSION_MICRO 101
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
LIBAVCODEC_VERSION_MINOR, \
|
||||
|
@ -1,4 +1,4 @@
|
||||
87ef06cbd15934c282d4aa83e2a5cf0a *tests/data/fate/vsynth1-avui.mov
|
||||
42624917 tests/data/fate/vsynth1-avui.mov
|
||||
25ef49e1aee0b20d4feee89b8dc093b4 *tests/data/fate/vsynth1-avui.mov
|
||||
42625037 tests/data/fate/vsynth1-avui.mov
|
||||
c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-avui.out.rawvideo
|
||||
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
|
||||
|
@ -1,4 +1,4 @@
|
||||
4d46be4cf21d2f0dc0a857bb2603b899 *tests/data/fate/vsynth2-avui.mov
|
||||
42624917 tests/data/fate/vsynth2-avui.mov
|
||||
8f6ab410bb6b5dc4599e12968dbd0366 *tests/data/fate/vsynth2-avui.mov
|
||||
42625037 tests/data/fate/vsynth2-avui.mov
|
||||
36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-avui.out.rawvideo
|
||||
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
|
||||
|
@ -1,4 +1,4 @@
|
||||
df5efcfd2170df82e466be4deb7ce4a9 *tests/data/fate/vsynth_lena-avui.mov
|
||||
42624917 tests/data/fate/vsynth_lena-avui.mov
|
||||
26805e15d9e732cd24aea91ae564d5c3 *tests/data/fate/vsynth_lena-avui.mov
|
||||
42625037 tests/data/fate/vsynth_lena-avui.mov
|
||||
dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth_lena-avui.out.rawvideo
|
||||
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
|
||||
|
Loading…
Reference in New Issue
Block a user