The contents of this field are not defined for decoding. Use pkt_timebase, which is the timebase of demuxed packets. Drop a tautological av_packet_rescale_ts() call, as the stream and decoder timebases are the same.