| Code-Review | +1 |
codec_context_->pkt_timebase = (AVRational){1, 1000000};no c_style casts.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +2 |
codec_context_->pkt_timebase = (AVRational){1, 1000000};Peter Collingbourneno c_style casts.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: media/filters/ffmpeg_video_decoder.cc
Insertions: 1, Deletions: 1.
@@ -494,7 +494,7 @@
// Timebase must be at most 1us because of web-facing APIs with
// microsecond-level precision such as VideoFrame.timestamp.
- codec_context_->pkt_timebase = (AVRational){1, 1000000};
+ codec_context_->pkt_timebase = AVRational{1, 1000000};
const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
if (!codec || avcodec_open2(codec_context_.get(), codec, nullptr) < 0) {
```
media: Derive frame ordering from AVFrame::pts
When using FFmpeg's libopenh264 backend for decoding H.264 (not used by
the upstream build, but some Linux distributions such as Fedora use it),
AVFrame::opaque is copied from AVPacket::opaque but is not adjusted to
take into account frame reordering (e.g. for B-frames). As a result,
frames may be displayed in the wrong order.
The correct way to determine the frame presentation order is to use the
presentation timestamp field, AVFrame::pts. This field is not set to a
valid value unless AVCodecContext::pkt_timebase and AVPacket::pts are set,
so do so.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |