This keeps cropping when remuxing from F4V to FLV.
Signed-off-by: Martin Storsjö <martin@martin.st>
... | ... |
@@ -527,9 +527,13 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) |
527 | 527 |
avio_wb32(pb, data_size + 11); |
528 | 528 |
} else { |
529 | 529 |
avio_w8(pb,flags); |
530 |
- if (enc->codec_id == AV_CODEC_ID_VP6F || enc->codec_id == AV_CODEC_ID_VP6A) |
|
531 |
- avio_w8(pb, enc->extradata_size ? enc->extradata[0] : 0); |
|
532 |
- else if (enc->codec_id == AV_CODEC_ID_AAC) |
|
530 |
+ if (enc->codec_id == AV_CODEC_ID_VP6F || enc->codec_id == AV_CODEC_ID_VP6A) { |
|
531 |
+ if (enc->extradata_size) |
|
532 |
+ avio_w8(pb, enc->extradata[0]); |
|
533 |
+ else |
|
534 |
+ avio_w8(pb, ((FFALIGN(enc->width, 16) - enc->width) << 4) | |
|
535 |
+ (FFALIGN(enc->height, 16) - enc->height)); |
|
536 |
+ } else if (enc->codec_id == AV_CODEC_ID_AAC) |
|
533 | 537 |
avio_w8(pb, 1); // AAC raw |
534 | 538 |
else if (enc->codec_id == AV_CODEC_ID_H264) { |
535 | 539 |
avio_w8(pb, 1); // AVC NALU |