mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/dpx: parse input device name
This commit is contained in:
parent
abb0306bf3
commit
9c881cf9a5
|
@ -109,6 +109,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||||
uint8_t *ptr[AV_NUM_DATA_POINTERS];
|
uint8_t *ptr[AV_NUM_DATA_POINTERS];
|
||||||
uint32_t header_version, version = 0;
|
uint32_t header_version, version = 0;
|
||||||
char creator[101];
|
char creator[101];
|
||||||
|
char input_device[33];
|
||||||
|
|
||||||
unsigned int offset;
|
unsigned int offset;
|
||||||
int magic_num, endian;
|
int magic_num, endian;
|
||||||
|
@ -366,6 +367,10 @@ static int decode_frame(AVCodecContext *avctx,
|
||||||
creator[100] = '\0';
|
creator[100] = '\0';
|
||||||
av_dict_set(&p->metadata, "Creator", creator, 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
|
// Move pointer to offset from start of file
|
||||||
buf = avpkt->data + offset;
|
buf = avpkt->data + offset;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue