提交 e9817636 编写于 作者: P Paul B Mahol

avformat/flac_picture: try to guess PNG by actual picture data

Fixes #5028.
上级 6f058b5c
......@@ -20,6 +20,8 @@
*/
#include "libavutil/avassert.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/png.h"
#include "avformat.h"
#include "flac_picture.h"
#include "id3v2.h"
......@@ -119,6 +121,9 @@ int ff_flac_parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size)
goto fail;
}
if (AV_RB64(data->data) == PNGSIG)
id = AV_CODEC_ID_PNG;
st = avformat_new_stream(s, NULL);
if (!st) {
RETURN_ERROR(AVERROR(ENOMEM));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册