Skip to content

Commit

Permalink
AvFormatDecoder: Use the AVMetadata structure for attachment filenames.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Kendall committed May 6, 2011
1 parent 6014eb6 commit 705613e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mythtv/libs/libmythtv/avformatdecoder.cpp
Expand Up @@ -3391,8 +3391,10 @@ void AvFormatDecoder::GetAttachmentData(uint trackNo, QByteArray &filename,
return;

int index = tracks[kTrackTypeAttachment][trackNo].av_stream_index;
// TODO deprecated - use AVMetaData
filename = QByteArray(ic->streams[index]->filename);
AVMetadataTag *tag = av_metadata_get(ic->streams[index]->metadata,
"filename", NULL, 0);
if (tag)
filename = QByteArray(tag->value);
data = QByteArray((char *)ic->streams[index]->codec->extradata,
ic->streams[index]->codec->extradata_size);
}
Expand Down

0 comments on commit 705613e

Please sign in to comment.