diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-12-06 22:23:37 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-12-07 21:44:57 +0300 |
commit | 9c881cf9a57e6b40a29f149825819c3f446eed11 (patch) | |
tree | 09e480c75df4d3f7ee741988095a0f63b5013aae /libavcodec/dpx.c | |
parent | abb0306bf301f82e1f18a3a70c04261fb0daa1e8 (diff) |
avcodec/dpx: parse input device name
Diffstat (limited to 'libavcodec/dpx.c')
-rw-r--r-- | libavcodec/dpx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index bc1115b6ba..31d8331068 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -109,6 +109,7 @@ static int decode_frame(AVCodecContext *avctx, uint8_t *ptr[AV_NUM_DATA_POINTERS]; uint32_t header_version, version = 0; char creator[101]; + char input_device[33]; unsigned int offset; int magic_num, endian; @@ -366,6 +367,10 @@ static int decode_frame(AVCodecContext *avctx, creator[100] = '\0'; av_dict_set(&p->metadata, "Creator", creator, 0); + av_strlcpy(input_device, avpkt->data + 1556, 32); + input_device[32] = '\0'; + av_dict_set(&p->metadata, "Input Device", input_device, 0); + // Move pointer to offset from start of file buf = avpkt->data + offset; |