mirror of https://git.ffmpeg.org/ffmpeg.git
asfdec: parse aspect ratio payload extension
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8c93269e42
commit
343c73e252
|
@ -949,6 +949,7 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){
|
||||||
}
|
}
|
||||||
if (asf->packet_replic_size >= 8) {
|
if (asf->packet_replic_size >= 8) {
|
||||||
int64_t end = avio_tell(pb) + asf->packet_replic_size;
|
int64_t end = avio_tell(pb) + asf->packet_replic_size;
|
||||||
|
AVRational aspect;
|
||||||
asf->packet_obj_size = avio_rl32(pb);
|
asf->packet_obj_size = avio_rl32(pb);
|
||||||
if(asf->packet_obj_size >= (1<<24) || asf->packet_obj_size <= 0){
|
if(asf->packet_obj_size >= (1<<24) || asf->packet_obj_size <= 0){
|
||||||
av_log(s, AV_LOG_ERROR, "packet_obj_size invalid\n");
|
av_log(s, AV_LOG_ERROR, "packet_obj_size invalid\n");
|
||||||
|
@ -971,6 +972,13 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){
|
||||||
case 0x50:
|
case 0x50:
|
||||||
// duration = avio_rl16(pb);
|
// duration = avio_rl16(pb);
|
||||||
break;
|
break;
|
||||||
|
case 0x54:
|
||||||
|
aspect.num = avio_r8(pb);
|
||||||
|
aspect.den = avio_r8(pb);
|
||||||
|
if (aspect.num > 0 && aspect.den > 0) {
|
||||||
|
s->streams[asf->stream_index]->sample_aspect_ratio = aspect;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 0x2A:
|
case 0x2A:
|
||||||
avio_skip(pb, 8);
|
avio_skip(pb, 8);
|
||||||
ts0= avio_rl64(pb);
|
ts0= avio_rl64(pb);
|
||||||
|
|
Loading…
Reference in New Issue