@@ -414,6 +414,10 @@ static int encode_headers(AVCodecContext *avctx, const AVFrame *pict)
}
}
+ side_data = av_frame_get_side_data(pict, AV_FRAME_DATA_EXIF);
+ if (side_data)
+ png_write_chunk(&s->bytestream, MKTAG('e', 'X', 'I', 'f'), side_data->data, FFMIN(side_data->size, INT_MAX));
+
side_data = av_frame_get_side_data(pict, AV_FRAME_DATA_ICC_PROFILE);
if ((ret = png_write_iccp(s, side_data)))
return ret;
@@ -1,5 +1,5 @@
-94946f0efd5f9bb0061ac1fbff7d731f *tests/data/fate/cover-art-mp3-id3v2-remux.mp3
-399346 tests/data/fate/cover-art-mp3-id3v2-remux.mp3
+0643e306430fbadeb1c89da6ab36a303 *tests/data/fate/cover-art-mp3-id3v2-remux.mp3
+399414 tests/data/fate/cover-art-mp3-id3v2-remux.mp3
#tb 0: 1/14112000
#media_type 0: audio
#codec_id 0: mp3
@@ -23,7 +23,7 @@
0, -353590, -353590, 368640, 417, 0x15848290, S=1, 10
1, 0, 0, 0, 208350, 0x291b44d1
2, 0, 0, 0, 15760, 0x71d5c418
-3, 0, 0, 0, 165671, 0x7c1c8070
+3, 0, 0, 0, 165739, 0x2e108b69
0, 15050, 15050, 368640, 418, 0x46f684a4
0, 383690, 383690, 368640, 418, 0x46f684a4
0, 752330, 752330, 368640, 418, 0x46f684a4
@@ -1,5 +1,5 @@
-54a8870d5d1e6cc4da28ae422aa70898 *tests/data/fate/mov-cover-image.mp4
-1011919 tests/data/fate/mov-cover-image.mp4
+371e01af72ce3bc8339429068455b920 *tests/data/fate/mov-cover-image.mp4
+1012013 tests/data/fate/mov-cover-image.mp4
#extradata 0: 2, 0x00340022
#tb 0: 1/44100
#media_type 0: audio
@@ -20,7 +20,7 @@
0, -1088, -1088, 1024, 6, 0x027e00e8, F=0x5
0, -64, -64, 1024, 6, 0x027e00e8
1, 0, 0, 0, 25441, 0xe82503b0
-2, 0, 0, 0, 32657, 0x080255d2
+2, 0, 0, 0, 32751, 0x410d5f1d
0, 960, 960, 1024, 6, 0x027e00e8
0, 1984, 1984, 1024, 6, 0x027e00e8
0, 3008, 3008, 1024, 6, 0x027e00e8
Write EXIF metadata exposed AV_FRAME_DATA_EXIF as an eXIf chunk to PNG files, if present. Signed-off-by: Leo Izen <leo.izen@gmail.com> --- libavcodec/pngenc.c | 4 ++++ tests/ref/fate/cover-art-mp3-id3v2-remux | 6 +++--- tests/ref/fate/mov-cover-image | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-)